-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve: Fix ICE in macro import error recovery
- Loading branch information
1 parent
d586d5d
commit dd68685
Showing
3 changed files
with
42 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,8 @@ | ||
use NonExistent; //~ ERROR unresolved import `NonExistent` | ||
use non_existent::non_existent; //~ ERROR unresolved import `non_existent` | ||
|
||
#[non_existent] //~ ERROR cannot determine resolution for the attribute macro `non_existent` | ||
#[derive(NonExistent)] //~ ERROR cannot determine resolution for the derive macro `NonExistent` | ||
struct S; | ||
|
||
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,31 @@ | ||
error[E0432]: unresolved import `NonExistent` | ||
--> $DIR/issue-55457.rs:1:5 | ||
| | ||
LL | use NonExistent; //~ ERROR unresolved import `NonExistent` | ||
| ^^^^^^^^^^^ no `NonExistent` in the root. Did you mean to use `non_existent`? | ||
|
||
error[E0432]: unresolved import `non_existent` | ||
--> $DIR/issue-55457.rs:2:5 | ||
| | ||
LL | use non_existent::non_existent; //~ ERROR unresolved import `non_existent` | ||
| ^^^^^^^^^^^^ Maybe a missing `extern crate non_existent;`? | ||
|
||
error: cannot determine resolution for the derive macro `NonExistent` | ||
--> $DIR/issue-55457.rs:5:10 | ||
| | ||
LL | #[derive(NonExistent)] //~ ERROR cannot determine resolution for the derive macro `NonExistent` | ||
| ^^^^^^^^^^^ | ||
| | ||
= note: import resolution is stuck, try simplifying macro imports | ||
|
||
error: cannot determine resolution for the attribute macro `non_existent` | ||
--> $DIR/issue-55457.rs:4:3 | ||
| | ||
LL | #[non_existent] //~ ERROR cannot determine resolution for the attribute macro `non_existent` | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: import resolution is stuck, try simplifying macro imports | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0432`. |