Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit missing unclosed delimiter errors
- Loading branch information
Showing
7 changed files
with
56 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;` | ||
--> $DIR/token-error-correct-3.rs:14:35 | ||
| | ||
LL | callback(path.as_ref(); //~ ERROR expected one of | ||
| - ^ | ||
| | | | ||
| | help: `)` may belong here | ||
| unclosed delimiter | ||
|
||
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` | ||
--> $DIR/token-error-correct-3.rs:20:9 | ||
error: incorrect close delimiter: `}` | ||
--> $DIR/token-error-correct-3.rs:19:9 | ||
| | ||
LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types | ||
| - expected one of `.`, `;`, `?`, `}`, or an operator here | ||
LL | if !is_directory(path.as_ref()) { | ||
| - close delimiter possibly meant for this | ||
LL | //~^ ERROR cannot find function `is_directory` | ||
LL | callback(path.as_ref(); | ||
| - un-closed delimiter | ||
... | ||
LL | } else { | ||
| ^ unexpected token | ||
| ^ incorrect close delimiter | ||
|
||
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;` | ||
--> $DIR/token-error-correct-3.rs:15:35 | ||
| | ||
LL | callback(path.as_ref(); | ||
| ^ expected one of `)`, `,`, `.`, `?`, or an operator here | ||
|
||
error[E0425]: cannot find function `is_directory` in this scope | ||
--> $DIR/token-error-correct-3.rs:13:13 | ||
| | ||
LL | if !is_directory(path.as_ref()) { //~ ERROR: cannot find function `is_directory` | ||
LL | if !is_directory(path.as_ref()) { | ||
| ^^^^^^^^^^^^ not found in this scope | ||
|
||
error[E0308]: mismatched types | ||
error[E0057]: this function takes 1 parameter but 2 parameters were supplied | ||
--> $DIR/token-error-correct-3.rs:15:13 | ||
| | ||
LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | ||
| | | ||
| expected (), found enum `std::result::Result` | ||
| | ||
= note: expected type `()` | ||
found type `std::result::Result<bool, std::io::Error>` | ||
LL | / callback(path.as_ref(); | ||
LL | | //~^ ERROR expected one of | ||
LL | | //~| ERROR this function takes 1 parameter but 2 parameters were supplied | ||
LL | | fs::create_dir_all(path.as_ref()).map(|()| true) | ||
LL | | } else { | ||
| |_________^ expected 1 parameter | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
Some errors occurred: E0308, E0425. | ||
For more information about an error, try `rustc --explain E0308`. | ||
Some errors occurred: E0057, E0425. | ||
For more information about an error, try `rustc --explain E0057`. |