Project: Income Tax
US Income Tax is calculated based on brackets. Write a program that uses the tables below to calculate the 2020 income tax. The program should accept two command line arguments. The first is the taxable income amount. The second is the tax table to use either S, M or H for single, married or head-of-household respectively. Use IF/ELSE statements to do the tax computation.
Rate | Taxable Income Bracket | Tax Owed |
---|---|---|
10% |
$0 to $9,875 | 10% of Taxable Income |
12% |
$9,876 to $40,125 | Maximum tax from previous bracket plus 12% of the excess over $9,875 |
22% |
$40,126 to $85,525 | Maximum tax from previous bracket plus 22% of the excess over $40,125 |
24% |
$85,526 to $163,300 | Maximum tax from previous bracket plus 24% of the excess over $85,525 |
32% |
$163,301 to $207,350 | Maximum tax from previous bracket plus 32% of the excess over $163,300 |
35% |
$207,351 to $518,400 | Maximum tax from previous bracket plus 35% of the excess over $207,350 |
37% |
$518,401+ | Maximum tax from previous bracket plus 37% of the excess over $518,400 |
Rate | Taxable Income Bracket | Tax Owed |
---|---|---|
10% |
$0 to $19,750 | 10% of Taxable Income |
12% |
$19,751 to $80,250 | Maximum tax from previous bracket plus 12% of the excess over $19,750 |
22% |
$80,251 to $171,050 | Maximum tax from previous bracket plus 22% of the excess over $80,250 |
24% |
$171,051 to $326,600 | Maximum tax from previous bracket plus 24% of the excess over $171,050 |
32% |
$326,601 to $414,700 | Maximum tax from previous bracket plus 32% of the excess over $326,600 |
35% |
$414,701 to $622,050 | Maximum tax from previous bracket plus 35% of the excess over $414,700 |
37% |
$622,051+ | Maximum tax from previous bracket plus 37% of the excess over $622,050 |
Rate | Taxable Income Bracket | Tax Owed |
---|---|---|
10% |
$0 to $14,100 | 10% of Taxable Income |
12% |
$14,101 to $53,700 | Maximum tax from previous bracket plus 12% of the excess over $14,100 |
22% |
$53,701 to $85,500 | Maximum tax from previous bracket plus 22% of the excess over $53,700 |
24% |
$85,501 to $163,300 | Maximum tax from previous bracket plus 24% of the excess over $85,500 |
32% |
$163,301 to $207,350 | Maximum tax from previous bracket plus 32% of the excess over $163,300 |
35% |
$207,351 to $518,400 | Maximum tax from previous bracket plus 35% of the excess over $207,350 |
37% |
$518,401+ | Maximum tax from previous bracket plus 37% of the excess over $518,400 |
Source: [[Federal Income Tax Brackets]]
Output
$ rustc IncomeTax2.rs
error: unknown format trait `s`
--> IncomeTax2.rs:19:38
|
19 | println!("{}", format!("Syntax: {0:s} income S|M|H", utils::program_name().expect("program name should not be empty!")));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> IncomeTax2.rs:125:52
|
125 | println!("{}", format!("Federal Income Tax: ${0:.2f}", incomeTax));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> IncomeTax2.rs:16:12
|
16 | income = Utils.stodWithDefault(args[1], 0);
| ^^^^^ not found in this scope
error[E0425]: cannot find function `exit` in this scope
--> IncomeTax2.rs:20:3
|
20 | exit(1);
| ^^^^ not found in this scope
|
help: consider importing this function
|
8 + use std::process::exit;
|
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:12:25
|
12 | let mut income:f64 = 0.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
12 | let mut income:f64 = 0.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:14:28
|
14 | let mut incomeTax:f64 = 0.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
14 | let mut incomeTax:f64 = 0.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:23:22
|
23 | if income <= 14100.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
23 | if income <= 14100.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:26:23
|
26 | incomeTax += 14100.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
26 | incomeTax += 14100.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:27:23
|
27 | if income <= 53700.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
27 | if income <= 53700.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:28:34
|
28 | incomeTax += (income - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
28 | incomeTax += (income - 14100.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:30:25
|
30 | incomeTax += (53700.f64 - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
30 | incomeTax += (53700.0f64 - 14100.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:30:37
|
30 | incomeTax += (53700.f64 - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
30 | incomeTax += (53700.f64 - 14100.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:31:24
|
31 | if income <= 85500.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
31 | if income <= 85500.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:32:35
|
32 | incomeTax += (income - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
32 | incomeTax += (income - 53700.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:34:26
|
34 | incomeTax += (85500.f64 - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | incomeTax += (85500.0f64 - 53700.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:34:38
|
34 | incomeTax += (85500.f64 - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | incomeTax += (85500.f64 - 53700.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:35:26
|
35 | if income <= 163300.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
35 | if income <= 163300.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:36:36
|
36 | incomeTax += (income - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
36 | incomeTax += (income - 85500.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:38:28
|
38 | incomeTax += (163300.f64 - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | incomeTax += (163300.0f64 - 85500.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:38:40
|
38 | incomeTax += (163300.f64 - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | incomeTax += (163300.f64 - 85500.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:39:27
|
39 | if income <= 207350.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
39 | if income <= 207350.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:40:38
|
40 | ... incomeTax += (income - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
40 | incomeTax += (income - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:42:29
|
42 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | incomeTax += (207350.0f64 - 163300.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:42:42
|
42 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | incomeTax += (207350.f64 - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:43:28
|
43 | ... if income <= 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
43 | if income <= 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:44:39
|
44 | ... incomeTax += (income - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
44 | incomeTax += (income - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:46:30
|
46 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
46 | incomeTax += (518400.0f64 - 207350.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:46:43
|
46 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
46 | incomeTax += (518400.f64 - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:47:28
|
47 | ... if income > 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
47 | if income > 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:48:40
|
48 | ... incomeTax += (income - 518400.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
48 | incomeTax += (income - 518400.0f64) * 0.37f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:57:22
|
57 | if income <= 19750.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
57 | if income <= 19750.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:60:23
|
60 | incomeTax += 19750.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
60 | incomeTax += 19750.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:61:23
|
61 | if income <= 80250.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
61 | if income <= 80250.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:62:34
|
62 | incomeTax += (income - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
62 | incomeTax += (income - 19750.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:64:25
|
64 | incomeTax += (80250.f64 - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
64 | incomeTax += (80250.0f64 - 19750.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:64:37
|
64 | incomeTax += (80250.f64 - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
64 | incomeTax += (80250.f64 - 19750.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:65:25
|
65 | if income <= 171050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
65 | if income <= 171050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:66:35
|
66 | incomeTax += (income - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
66 | incomeTax += (income - 80250.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:68:27
|
68 | incomeTax += (171050.f64 - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
68 | incomeTax += (171050.0f64 - 80250.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:68:39
|
68 | incomeTax += (171050.f64 - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
68 | incomeTax += (171050.f64 - 80250.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:69:26
|
69 | if income <= 326600.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
69 | if income <= 326600.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:70:37
|
70 | incomeTax += (income - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
70 | incomeTax += (income - 171050.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:72:28
|
72 | incomeTax += (326600.f64 - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
72 | incomeTax += (326600.0f64 - 171050.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:72:41
|
72 | incomeTax += (326600.f64 - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
72 | incomeTax += (326600.f64 - 171050.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:73:27
|
73 | if income <= 414700.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
73 | if income <= 414700.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:74:38
|
74 | ... incomeTax += (income - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
74 | incomeTax += (income - 326600.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:76:29
|
76 | ... incomeTax += (414700.f64 - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
76 | incomeTax += (414700.0f64 - 326600.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:76:42
|
76 | ... incomeTax += (414700.f64 - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
76 | incomeTax += (414700.f64 - 326600.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:77:28
|
77 | ... if income <= 622050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
77 | if income <= 622050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:78:39
|
78 | ... incomeTax += (income - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
78 | incomeTax += (income - 414700.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:80:30
|
80 | ... incomeTax += (622050.f64 - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
80 | incomeTax += (622050.0f64 - 414700.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:80:43
|
80 | ... incomeTax += (622050.f64 - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
80 | incomeTax += (622050.f64 - 414700.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:81:28
|
81 | ... if income > 622050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
81 | if income > 622050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:82:40
|
82 | ... incomeTax += (income - 622050.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
82 | incomeTax += (income - 622050.0f64) * 0.37f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:91:21
|
91 | if income <= 9875.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
91 | if income <= 9875.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:94:22
|
94 | incomeTax += 9875.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
94 | incomeTax += 9875.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:95:23
|
95 | if income <= 40125.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
95 | if income <= 40125.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:96:33
|
96 | incomeTax += (income - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
96 | incomeTax += (income - 9875.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:98:25
|
98 | incomeTax += (40125.f64 - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
98 | incomeTax += (40125.0f64 - 9875.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:98:36
|
98 | incomeTax += (40125.f64 - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
98 | incomeTax += (40125.f64 - 9875.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:99:24
|
99 | if income <= 85525.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
99 | if income <= 85525.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:100:35
|
100 | incomeTax += (income - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
100 | incomeTax += (income - 40125.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:102:26
|
102 | incomeTax += (85525.f64 - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
102 | incomeTax += (85525.0f64 - 40125.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:102:38
|
102 | incomeTax += (85525.f64 - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
102 | incomeTax += (85525.f64 - 40125.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:103:26
|
103 | if income <= 163300.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
103 | if income <= 163300.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:104:36
|
104 | incomeTax += (income - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
104 | incomeTax += (income - 85525.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:106:28
|
106 | incomeTax += (163300.f64 - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
106 | incomeTax += (163300.0f64 - 85525.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:106:40
|
106 | incomeTax += (163300.f64 - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
106 | incomeTax += (163300.f64 - 85525.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:107:27
|
107 | if income <= 207350.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
107 | if income <= 207350.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:108:38
|
108 | ... incomeTax += (income - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
108 | incomeTax += (income - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:110:29
|
110 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
110 | incomeTax += (207350.0f64 - 163300.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:110:42
|
110 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
110 | incomeTax += (207350.f64 - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:111:28
|
111 | ... if income <= 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
111 | if income <= 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:112:39
|
112 | ... incomeTax += (income - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
112 | incomeTax += (income - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:114:30
|
114 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
114 | incomeTax += (518400.0f64 - 207350.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:114:43
|
114 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
114 | incomeTax += (518400.f64 - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:115:28
|
115 | ... if income > 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
115 | if income > 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:116:40
|
116 | ... incomeTax += (income - 518400.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
116 | incomeTax += (income - 518400.0f64) * 0.37f64;
| +
error: aborting due to 78 previous errors
Some errors have detailed explanations: E0425, E0610.
For more information about an error, try `rustc --explain E0425`.
$ rustc IncomeTax2.rs
error: unknown format trait `s`
--> IncomeTax2.rs:19:38
|
19 | println!("{}", format!("Syntax: {0:s} income S|M|H", utils::program_name().expect("program name should not be empty!")));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> IncomeTax2.rs:125:52
|
125 | println!("{}", format!("Federal Income Tax: ${0:.2f}", incomeTax));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> IncomeTax2.rs:16:12
|
16 | income = Utils.stodWithDefault(args[1], 0);
| ^^^^^ not found in this scope
error[E0425]: cannot find function `exit` in this scope
--> IncomeTax2.rs:20:3
|
20 | exit(1);
| ^^^^ not found in this scope
|
help: consider importing this function
|
8 + use std::process::exit;
|
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:12:25
|
12 | let mut income:f64 = 0.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
12 | let mut income:f64 = 0.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:14:28
|
14 | let mut incomeTax:f64 = 0.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
14 | let mut incomeTax:f64 = 0.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:23:22
|
23 | if income <= 14100.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
23 | if income <= 14100.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:26:23
|
26 | incomeTax += 14100.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
26 | incomeTax += 14100.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:27:23
|
27 | if income <= 53700.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
27 | if income <= 53700.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:28:34
|
28 | incomeTax += (income - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
28 | incomeTax += (income - 14100.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:30:25
|
30 | incomeTax += (53700.f64 - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
30 | incomeTax += (53700.0f64 - 14100.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:30:37
|
30 | incomeTax += (53700.f64 - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
30 | incomeTax += (53700.f64 - 14100.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:31:24
|
31 | if income <= 85500.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
31 | if income <= 85500.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:32:35
|
32 | incomeTax += (income - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
32 | incomeTax += (income - 53700.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:34:26
|
34 | incomeTax += (85500.f64 - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | incomeTax += (85500.0f64 - 53700.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:34:38
|
34 | incomeTax += (85500.f64 - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | incomeTax += (85500.f64 - 53700.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:35:26
|
35 | if income <= 163300.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
35 | if income <= 163300.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:36:36
|
36 | incomeTax += (income - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
36 | incomeTax += (income - 85500.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:38:28
|
38 | incomeTax += (163300.f64 - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | incomeTax += (163300.0f64 - 85500.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:38:40
|
38 | incomeTax += (163300.f64 - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | incomeTax += (163300.f64 - 85500.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:39:27
|
39 | if income <= 207350.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
39 | if income <= 207350.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:40:38
|
40 | ... incomeTax += (income - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
40 | incomeTax += (income - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:42:29
|
42 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | incomeTax += (207350.0f64 - 163300.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:42:42
|
42 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | incomeTax += (207350.f64 - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:43:28
|
43 | ... if income <= 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
43 | if income <= 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:44:39
|
44 | ... incomeTax += (income - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
44 | incomeTax += (income - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:46:30
|
46 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
46 | incomeTax += (518400.0f64 - 207350.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:46:43
|
46 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
46 | incomeTax += (518400.f64 - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:47:28
|
47 | ... if income > 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
47 | if income > 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:48:40
|
48 | ... incomeTax += (income - 518400.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
48 | incomeTax += (income - 518400.0f64) * 0.37f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:57:22
|
57 | if income <= 19750.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
57 | if income <= 19750.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:60:23
|
60 | incomeTax += 19750.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
60 | incomeTax += 19750.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:61:23
|
61 | if income <= 80250.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
61 | if income <= 80250.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:62:34
|
62 | incomeTax += (income - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
62 | incomeTax += (income - 19750.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:64:25
|
64 | incomeTax += (80250.f64 - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
64 | incomeTax += (80250.0f64 - 19750.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:64:37
|
64 | incomeTax += (80250.f64 - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
64 | incomeTax += (80250.f64 - 19750.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:65:25
|
65 | if income <= 171050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
65 | if income <= 171050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:66:35
|
66 | incomeTax += (income - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
66 | incomeTax += (income - 80250.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:68:27
|
68 | incomeTax += (171050.f64 - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
68 | incomeTax += (171050.0f64 - 80250.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:68:39
|
68 | incomeTax += (171050.f64 - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
68 | incomeTax += (171050.f64 - 80250.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:69:26
|
69 | if income <= 326600.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
69 | if income <= 326600.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:70:37
|
70 | incomeTax += (income - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
70 | incomeTax += (income - 171050.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:72:28
|
72 | incomeTax += (326600.f64 - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
72 | incomeTax += (326600.0f64 - 171050.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:72:41
|
72 | incomeTax += (326600.f64 - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
72 | incomeTax += (326600.f64 - 171050.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:73:27
|
73 | if income <= 414700.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
73 | if income <= 414700.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:74:38
|
74 | ... incomeTax += (income - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
74 | incomeTax += (income - 326600.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:76:29
|
76 | ... incomeTax += (414700.f64 - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
76 | incomeTax += (414700.0f64 - 326600.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:76:42
|
76 | ... incomeTax += (414700.f64 - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
76 | incomeTax += (414700.f64 - 326600.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:77:28
|
77 | ... if income <= 622050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
77 | if income <= 622050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:78:39
|
78 | ... incomeTax += (income - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
78 | incomeTax += (income - 414700.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:80:30
|
80 | ... incomeTax += (622050.f64 - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
80 | incomeTax += (622050.0f64 - 414700.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:80:43
|
80 | ... incomeTax += (622050.f64 - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
80 | incomeTax += (622050.f64 - 414700.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:81:28
|
81 | ... if income > 622050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
81 | if income > 622050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:82:40
|
82 | ... incomeTax += (income - 622050.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
82 | incomeTax += (income - 622050.0f64) * 0.37f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:91:21
|
91 | if income <= 9875.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
91 | if income <= 9875.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:94:22
|
94 | incomeTax += 9875.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
94 | incomeTax += 9875.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:95:23
|
95 | if income <= 40125.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
95 | if income <= 40125.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:96:33
|
96 | incomeTax += (income - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
96 | incomeTax += (income - 9875.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:98:25
|
98 | incomeTax += (40125.f64 - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
98 | incomeTax += (40125.0f64 - 9875.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:98:36
|
98 | incomeTax += (40125.f64 - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
98 | incomeTax += (40125.f64 - 9875.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:99:24
|
99 | if income <= 85525.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
99 | if income <= 85525.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:100:35
|
100 | incomeTax += (income - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
100 | incomeTax += (income - 40125.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:102:26
|
102 | incomeTax += (85525.f64 - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
102 | incomeTax += (85525.0f64 - 40125.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:102:38
|
102 | incomeTax += (85525.f64 - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
102 | incomeTax += (85525.f64 - 40125.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:103:26
|
103 | if income <= 163300.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
103 | if income <= 163300.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:104:36
|
104 | incomeTax += (income - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
104 | incomeTax += (income - 85525.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:106:28
|
106 | incomeTax += (163300.f64 - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
106 | incomeTax += (163300.0f64 - 85525.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:106:40
|
106 | incomeTax += (163300.f64 - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
106 | incomeTax += (163300.f64 - 85525.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:107:27
|
107 | if income <= 207350.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
107 | if income <= 207350.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:108:38
|
108 | ... incomeTax += (income - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
108 | incomeTax += (income - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:110:29
|
110 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
110 | incomeTax += (207350.0f64 - 163300.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:110:42
|
110 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
110 | incomeTax += (207350.f64 - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:111:28
|
111 | ... if income <= 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
111 | if income <= 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:112:39
|
112 | ... incomeTax += (income - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
112 | incomeTax += (income - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:114:30
|
114 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
114 | incomeTax += (518400.0f64 - 207350.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:114:43
|
114 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
114 | incomeTax += (518400.f64 - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:115:28
|
115 | ... if income > 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
115 | if income > 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:116:40
|
116 | ... incomeTax += (income - 518400.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
116 | incomeTax += (income - 518400.0f64) * 0.37f64;
| +
error: aborting due to 78 previous errors
Some errors have detailed explanations: E0425, E0610.
For more information about an error, try `rustc --explain E0425`.
$ rustc IncomeTax2.rs
error: unknown format trait `s`
--> IncomeTax2.rs:19:38
|
19 | println!("{}", format!("Syntax: {0:s} income S|M|H", utils::program_name().expect("program name should not be empty!")));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> IncomeTax2.rs:125:52
|
125 | println!("{}", format!("Federal Income Tax: ${0:.2f}", incomeTax));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> IncomeTax2.rs:16:12
|
16 | income = Utils.stodWithDefault(args[1], 0);
| ^^^^^ not found in this scope
error[E0425]: cannot find function `exit` in this scope
--> IncomeTax2.rs:20:3
|
20 | exit(1);
| ^^^^ not found in this scope
|
help: consider importing this function
|
8 + use std::process::exit;
|
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:12:25
|
12 | let mut income:f64 = 0.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
12 | let mut income:f64 = 0.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:14:28
|
14 | let mut incomeTax:f64 = 0.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
14 | let mut incomeTax:f64 = 0.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:23:22
|
23 | if income <= 14100.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
23 | if income <= 14100.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:26:23
|
26 | incomeTax += 14100.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
26 | incomeTax += 14100.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:27:23
|
27 | if income <= 53700.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
27 | if income <= 53700.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:28:34
|
28 | incomeTax += (income - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
28 | incomeTax += (income - 14100.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:30:25
|
30 | incomeTax += (53700.f64 - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
30 | incomeTax += (53700.0f64 - 14100.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:30:37
|
30 | incomeTax += (53700.f64 - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
30 | incomeTax += (53700.f64 - 14100.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:31:24
|
31 | if income <= 85500.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
31 | if income <= 85500.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:32:35
|
32 | incomeTax += (income - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
32 | incomeTax += (income - 53700.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:34:26
|
34 | incomeTax += (85500.f64 - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | incomeTax += (85500.0f64 - 53700.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:34:38
|
34 | incomeTax += (85500.f64 - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | incomeTax += (85500.f64 - 53700.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:35:26
|
35 | if income <= 163300.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
35 | if income <= 163300.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:36:36
|
36 | incomeTax += (income - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
36 | incomeTax += (income - 85500.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:38:28
|
38 | incomeTax += (163300.f64 - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | incomeTax += (163300.0f64 - 85500.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:38:40
|
38 | incomeTax += (163300.f64 - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | incomeTax += (163300.f64 - 85500.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:39:27
|
39 | if income <= 207350.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
39 | if income <= 207350.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:40:38
|
40 | ... incomeTax += (income - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
40 | incomeTax += (income - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:42:29
|
42 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | incomeTax += (207350.0f64 - 163300.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:42:42
|
42 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | incomeTax += (207350.f64 - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:43:28
|
43 | ... if income <= 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
43 | if income <= 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:44:39
|
44 | ... incomeTax += (income - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
44 | incomeTax += (income - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:46:30
|
46 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
46 | incomeTax += (518400.0f64 - 207350.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:46:43
|
46 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
46 | incomeTax += (518400.f64 - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:47:28
|
47 | ... if income > 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
47 | if income > 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:48:40
|
48 | ... incomeTax += (income - 518400.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
48 | incomeTax += (income - 518400.0f64) * 0.37f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:57:22
|
57 | if income <= 19750.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
57 | if income <= 19750.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:60:23
|
60 | incomeTax += 19750.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
60 | incomeTax += 19750.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:61:23
|
61 | if income <= 80250.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
61 | if income <= 80250.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:62:34
|
62 | incomeTax += (income - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
62 | incomeTax += (income - 19750.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:64:25
|
64 | incomeTax += (80250.f64 - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
64 | incomeTax += (80250.0f64 - 19750.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:64:37
|
64 | incomeTax += (80250.f64 - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
64 | incomeTax += (80250.f64 - 19750.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:65:25
|
65 | if income <= 171050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
65 | if income <= 171050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:66:35
|
66 | incomeTax += (income - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
66 | incomeTax += (income - 80250.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:68:27
|
68 | incomeTax += (171050.f64 - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
68 | incomeTax += (171050.0f64 - 80250.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:68:39
|
68 | incomeTax += (171050.f64 - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
68 | incomeTax += (171050.f64 - 80250.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:69:26
|
69 | if income <= 326600.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
69 | if income <= 326600.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:70:37
|
70 | incomeTax += (income - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
70 | incomeTax += (income - 171050.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:72:28
|
72 | incomeTax += (326600.f64 - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
72 | incomeTax += (326600.0f64 - 171050.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:72:41
|
72 | incomeTax += (326600.f64 - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
72 | incomeTax += (326600.f64 - 171050.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:73:27
|
73 | if income <= 414700.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
73 | if income <= 414700.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:74:38
|
74 | ... incomeTax += (income - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
74 | incomeTax += (income - 326600.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:76:29
|
76 | ... incomeTax += (414700.f64 - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
76 | incomeTax += (414700.0f64 - 326600.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:76:42
|
76 | ... incomeTax += (414700.f64 - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
76 | incomeTax += (414700.f64 - 326600.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:77:28
|
77 | ... if income <= 622050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
77 | if income <= 622050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:78:39
|
78 | ... incomeTax += (income - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
78 | incomeTax += (income - 414700.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:80:30
|
80 | ... incomeTax += (622050.f64 - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
80 | incomeTax += (622050.0f64 - 414700.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:80:43
|
80 | ... incomeTax += (622050.f64 - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
80 | incomeTax += (622050.f64 - 414700.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:81:28
|
81 | ... if income > 622050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
81 | if income > 622050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:82:40
|
82 | ... incomeTax += (income - 622050.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
82 | incomeTax += (income - 622050.0f64) * 0.37f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:91:21
|
91 | if income <= 9875.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
91 | if income <= 9875.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:94:22
|
94 | incomeTax += 9875.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
94 | incomeTax += 9875.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:95:23
|
95 | if income <= 40125.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
95 | if income <= 40125.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:96:33
|
96 | incomeTax += (income - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
96 | incomeTax += (income - 9875.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:98:25
|
98 | incomeTax += (40125.f64 - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
98 | incomeTax += (40125.0f64 - 9875.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:98:36
|
98 | incomeTax += (40125.f64 - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
98 | incomeTax += (40125.f64 - 9875.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:99:24
|
99 | if income <= 85525.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
99 | if income <= 85525.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:100:35
|
100 | incomeTax += (income - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
100 | incomeTax += (income - 40125.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:102:26
|
102 | incomeTax += (85525.f64 - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
102 | incomeTax += (85525.0f64 - 40125.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:102:38
|
102 | incomeTax += (85525.f64 - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
102 | incomeTax += (85525.f64 - 40125.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:103:26
|
103 | if income <= 163300.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
103 | if income <= 163300.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:104:36
|
104 | incomeTax += (income - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
104 | incomeTax += (income - 85525.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:106:28
|
106 | incomeTax += (163300.f64 - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
106 | incomeTax += (163300.0f64 - 85525.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:106:40
|
106 | incomeTax += (163300.f64 - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
106 | incomeTax += (163300.f64 - 85525.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:107:27
|
107 | if income <= 207350.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
107 | if income <= 207350.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:108:38
|
108 | ... incomeTax += (income - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
108 | incomeTax += (income - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:110:29
|
110 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
110 | incomeTax += (207350.0f64 - 163300.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:110:42
|
110 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
110 | incomeTax += (207350.f64 - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:111:28
|
111 | ... if income <= 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
111 | if income <= 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:112:39
|
112 | ... incomeTax += (income - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
112 | incomeTax += (income - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:114:30
|
114 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
114 | incomeTax += (518400.0f64 - 207350.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:114:43
|
114 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
114 | incomeTax += (518400.f64 - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:115:28
|
115 | ... if income > 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
115 | if income > 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:116:40
|
116 | ... incomeTax += (income - 518400.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
116 | incomeTax += (income - 518400.0f64) * 0.37f64;
| +
error: aborting due to 78 previous errors
Some errors have detailed explanations: E0425, E0610.
For more information about an error, try `rustc --explain E0425`.
$ rustc IncomeTax2.rs
error: unknown format trait `s`
--> IncomeTax2.rs:19:38
|
19 | println!("{}", format!("Syntax: {0:s} income S|M|H", utils::program_name().expect("program name should not be empty!")));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> IncomeTax2.rs:125:52
|
125 | println!("{}", format!("Federal Income Tax: ${0:.2f}", incomeTax));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> IncomeTax2.rs:16:12
|
16 | income = Utils.stodWithDefault(args[1], 0);
| ^^^^^ not found in this scope
error[E0425]: cannot find function `exit` in this scope
--> IncomeTax2.rs:20:3
|
20 | exit(1);
| ^^^^ not found in this scope
|
help: consider importing this function
|
8 + use std::process::exit;
|
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:12:25
|
12 | let mut income:f64 = 0.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
12 | let mut income:f64 = 0.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:14:28
|
14 | let mut incomeTax:f64 = 0.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
14 | let mut incomeTax:f64 = 0.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:23:22
|
23 | if income <= 14100.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
23 | if income <= 14100.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:26:23
|
26 | incomeTax += 14100.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
26 | incomeTax += 14100.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:27:23
|
27 | if income <= 53700.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
27 | if income <= 53700.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:28:34
|
28 | incomeTax += (income - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
28 | incomeTax += (income - 14100.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:30:25
|
30 | incomeTax += (53700.f64 - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
30 | incomeTax += (53700.0f64 - 14100.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:30:37
|
30 | incomeTax += (53700.f64 - 14100.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
30 | incomeTax += (53700.f64 - 14100.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:31:24
|
31 | if income <= 85500.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
31 | if income <= 85500.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:32:35
|
32 | incomeTax += (income - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
32 | incomeTax += (income - 53700.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:34:26
|
34 | incomeTax += (85500.f64 - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | incomeTax += (85500.0f64 - 53700.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:34:38
|
34 | incomeTax += (85500.f64 - 53700.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | incomeTax += (85500.f64 - 53700.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:35:26
|
35 | if income <= 163300.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
35 | if income <= 163300.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:36:36
|
36 | incomeTax += (income - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
36 | incomeTax += (income - 85500.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:38:28
|
38 | incomeTax += (163300.f64 - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | incomeTax += (163300.0f64 - 85500.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:38:40
|
38 | incomeTax += (163300.f64 - 85500.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | incomeTax += (163300.f64 - 85500.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:39:27
|
39 | if income <= 207350.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
39 | if income <= 207350.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:40:38
|
40 | ... incomeTax += (income - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
40 | incomeTax += (income - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:42:29
|
42 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | incomeTax += (207350.0f64 - 163300.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:42:42
|
42 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | incomeTax += (207350.f64 - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:43:28
|
43 | ... if income <= 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
43 | if income <= 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:44:39
|
44 | ... incomeTax += (income - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
44 | incomeTax += (income - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:46:30
|
46 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
46 | incomeTax += (518400.0f64 - 207350.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:46:43
|
46 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
46 | incomeTax += (518400.f64 - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:47:28
|
47 | ... if income > 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
47 | if income > 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:48:40
|
48 | ... incomeTax += (income - 518400.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
48 | incomeTax += (income - 518400.0f64) * 0.37f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:57:22
|
57 | if income <= 19750.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
57 | if income <= 19750.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:60:23
|
60 | incomeTax += 19750.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
60 | incomeTax += 19750.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:61:23
|
61 | if income <= 80250.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
61 | if income <= 80250.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:62:34
|
62 | incomeTax += (income - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
62 | incomeTax += (income - 19750.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:64:25
|
64 | incomeTax += (80250.f64 - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
64 | incomeTax += (80250.0f64 - 19750.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:64:37
|
64 | incomeTax += (80250.f64 - 19750.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
64 | incomeTax += (80250.f64 - 19750.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:65:25
|
65 | if income <= 171050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
65 | if income <= 171050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:66:35
|
66 | incomeTax += (income - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
66 | incomeTax += (income - 80250.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:68:27
|
68 | incomeTax += (171050.f64 - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
68 | incomeTax += (171050.0f64 - 80250.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:68:39
|
68 | incomeTax += (171050.f64 - 80250.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
68 | incomeTax += (171050.f64 - 80250.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:69:26
|
69 | if income <= 326600.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
69 | if income <= 326600.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:70:37
|
70 | incomeTax += (income - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
70 | incomeTax += (income - 171050.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:72:28
|
72 | incomeTax += (326600.f64 - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
72 | incomeTax += (326600.0f64 - 171050.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:72:41
|
72 | incomeTax += (326600.f64 - 171050.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
72 | incomeTax += (326600.f64 - 171050.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:73:27
|
73 | if income <= 414700.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
73 | if income <= 414700.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:74:38
|
74 | ... incomeTax += (income - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
74 | incomeTax += (income - 326600.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:76:29
|
76 | ... incomeTax += (414700.f64 - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
76 | incomeTax += (414700.0f64 - 326600.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:76:42
|
76 | ... incomeTax += (414700.f64 - 326600.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
76 | incomeTax += (414700.f64 - 326600.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:77:28
|
77 | ... if income <= 622050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
77 | if income <= 622050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:78:39
|
78 | ... incomeTax += (income - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
78 | incomeTax += (income - 414700.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:80:30
|
80 | ... incomeTax += (622050.f64 - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
80 | incomeTax += (622050.0f64 - 414700.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:80:43
|
80 | ... incomeTax += (622050.f64 - 414700.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
80 | incomeTax += (622050.f64 - 414700.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:81:28
|
81 | ... if income > 622050.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
81 | if income > 622050.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:82:40
|
82 | ... incomeTax += (income - 622050.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
82 | incomeTax += (income - 622050.0f64) * 0.37f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:91:21
|
91 | if income <= 9875.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
91 | if income <= 9875.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:94:22
|
94 | incomeTax += 9875.f64 * 0.10f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
94 | incomeTax += 9875.0f64 * 0.10f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:95:23
|
95 | if income <= 40125.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
95 | if income <= 40125.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:96:33
|
96 | incomeTax += (income - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
96 | incomeTax += (income - 9875.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:98:25
|
98 | incomeTax += (40125.f64 - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
98 | incomeTax += (40125.0f64 - 9875.f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:98:36
|
98 | incomeTax += (40125.f64 - 9875.f64) * 0.12f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
98 | incomeTax += (40125.f64 - 9875.0f64) * 0.12f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:99:24
|
99 | if income <= 85525.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
99 | if income <= 85525.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:100:35
|
100 | incomeTax += (income - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
100 | incomeTax += (income - 40125.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:102:26
|
102 | incomeTax += (85525.f64 - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
102 | incomeTax += (85525.0f64 - 40125.f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:102:38
|
102 | incomeTax += (85525.f64 - 40125.f64) * 0.22f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
102 | incomeTax += (85525.f64 - 40125.0f64) * 0.22f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:103:26
|
103 | if income <= 163300.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
103 | if income <= 163300.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:104:36
|
104 | incomeTax += (income - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
104 | incomeTax += (income - 85525.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:106:28
|
106 | incomeTax += (163300.f64 - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
106 | incomeTax += (163300.0f64 - 85525.f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:106:40
|
106 | incomeTax += (163300.f64 - 85525.f64) * 0.24f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
106 | incomeTax += (163300.f64 - 85525.0f64) * 0.24f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:107:27
|
107 | if income <= 207350.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
107 | if income <= 207350.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:108:38
|
108 | ... incomeTax += (income - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
108 | incomeTax += (income - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:110:29
|
110 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
110 | incomeTax += (207350.0f64 - 163300.f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:110:42
|
110 | ... incomeTax += (207350.f64 - 163300.f64) * 0.32f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
110 | incomeTax += (207350.f64 - 163300.0f64) * 0.32f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:111:28
|
111 | ... if income <= 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
111 | if income <= 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:112:39
|
112 | ... incomeTax += (income - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
112 | incomeTax += (income - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:114:30
|
114 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
114 | incomeTax += (518400.0f64 - 207350.f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:114:43
|
114 | ... incomeTax += (518400.f64 - 207350.f64) * 0.35f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
114 | incomeTax += (518400.f64 - 207350.0f64) * 0.35f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:115:28
|
115 | ... if income > 518400.f64 {
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
115 | if income > 518400.0f64 {
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> IncomeTax2.rs:116:40
|
116 | ... incomeTax += (income - 518400.f64) * 0.37f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
116 | incomeTax += (income - 518400.0f64) * 0.37f64;
| +
error: aborting due to 78 previous errors
Some errors have detailed explanations: E0425, E0610.
For more information about an error, try `rustc --explain E0425`.