forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#103443 - mucinoab:recover-colon-as-path-sep…
…aretor, r=compiler-errors Parser: Recover from using colon as path separator in imports I don't know if this is the right approach, any feedback is welcome. r? `@compiler-errors` Fixes rust-lang#103269
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Recover from using a colon as a path separator. | ||
|
||
use std::process:Command; | ||
//~^ ERROR expected `::`, found `:` | ||
use std:fs::File; | ||
//~^ ERROR expected `::`, found `:` | ||
use std:collections:HashMap; | ||
//~^ ERROR expected `::`, found `:` | ||
//~| ERROR expected `::`, found `:` | ||
|
||
fn main() { } |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
error: expected `::`, found `:` | ||
--> $DIR/use-colon-as-mod-sep.rs:3:17 | ||
| | ||
LL | use std::process:Command; | ||
| ^ help: use double colon | ||
| | ||
= note: import paths are delimited using `::` | ||
|
||
error: expected `::`, found `:` | ||
--> $DIR/use-colon-as-mod-sep.rs:5:8 | ||
| | ||
LL | use std:fs::File; | ||
| ^ help: use double colon | ||
|
||
error: expected `::`, found `:` | ||
--> $DIR/use-colon-as-mod-sep.rs:7:8 | ||
| | ||
LL | use std:collections:HashMap; | ||
| ^ help: use double colon | ||
|
||
error: expected `::`, found `:` | ||
--> $DIR/use-colon-as-mod-sep.rs:7:20 | ||
| | ||
LL | use std:collections:HashMap; | ||
| ^ help: use double colon | ||
|
||
error: aborting due to 4 previous errors | ||
|