|
1 | | -error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;` |
2 | | - --> $DIR/token-error-correct-3.rs:14:35 |
3 | | - | |
4 | | -LL | callback(path.as_ref(); //~ ERROR expected one of |
5 | | - | - ^ |
6 | | - | | | |
7 | | - | | help: `)` may belong here |
8 | | - | unclosed delimiter |
9 | | - |
10 | | -error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` |
11 | | - --> $DIR/token-error-correct-3.rs:20:9 |
| 1 | +error: incorrect close delimiter: `}` |
| 2 | + --> $DIR/token-error-correct-3.rs:19:9 |
12 | 3 | | |
13 | | -LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types |
14 | | - | - expected one of `.`, `;`, `?`, `}`, or an operator here |
| 4 | +LL | if !is_directory(path.as_ref()) { |
| 5 | + | - close delimiter possibly meant for this |
| 6 | +LL | //~^ ERROR cannot find function `is_directory` |
| 7 | +LL | callback(path.as_ref(); |
| 8 | + | - un-closed delimiter |
15 | 9 | ... |
16 | 10 | LL | } else { |
17 | | - | ^ unexpected token |
| 11 | + | ^ incorrect close delimiter |
| 12 | + |
| 13 | +error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;` |
| 14 | + --> $DIR/token-error-correct-3.rs:15:35 |
| 15 | + | |
| 16 | +LL | callback(path.as_ref(); |
| 17 | + | ^ expected one of `)`, `,`, `.`, `?`, or an operator here |
18 | 18 |
|
19 | 19 | error[E0425]: cannot find function `is_directory` in this scope |
20 | 20 | --> $DIR/token-error-correct-3.rs:13:13 |
21 | 21 | | |
22 | | -LL | if !is_directory(path.as_ref()) { //~ ERROR: cannot find function `is_directory` |
| 22 | +LL | if !is_directory(path.as_ref()) { |
23 | 23 | | ^^^^^^^^^^^^ not found in this scope |
24 | 24 |
|
25 | | -error[E0308]: mismatched types |
| 25 | +error[E0057]: this function takes 1 parameter but 2 parameters were supplied |
26 | 26 | --> $DIR/token-error-correct-3.rs:15:13 |
27 | 27 | | |
28 | | -LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types |
29 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` |
30 | | - | | |
31 | | - | expected (), found enum `std::result::Result` |
32 | | - | |
33 | | - = note: expected type `()` |
34 | | - found type `std::result::Result<bool, std::io::Error>` |
| 28 | +LL | / callback(path.as_ref(); |
| 29 | +LL | | //~^ ERROR expected one of |
| 30 | +LL | | //~| ERROR this function takes 1 parameter but 2 parameters were supplied |
| 31 | +LL | | fs::create_dir_all(path.as_ref()).map(|()| true) |
| 32 | +LL | | } else { |
| 33 | + | |_________^ expected 1 parameter |
35 | 34 |
|
36 | 35 | error: aborting due to 4 previous errors |
37 | 36 |
|
38 | | -Some errors occurred: E0308, E0425. |
39 | | -For more information about an error, try `rustc --explain E0308`. |
| 37 | +Some errors occurred: E0057, E0425. |
| 38 | +For more information about an error, try `rustc --explain E0057`. |
0 commit comments