-
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.
Do not consider built-in attributes as candidates when resolving non-…
…attribute macro invocations This is needed to avoid regressions on stable channel
- Loading branch information
1 parent
d2f5637
commit e7ee6fb
Showing
7 changed files
with
20 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
error: expected a macro, found built-in attribute | ||
error: cannot find derive macro `inline` in this scope | ||
--> $DIR/macro-path-prelude-fail-3.rs:13:10 | ||
| | ||
LL | #[derive(inline)] //~ ERROR expected a macro, found built-in attribute | ||
LL | #[derive(inline)] //~ ERROR cannot find derive macro `inline` in this scope | ||
| ^^^^^^ | ||
|
||
error: expected a macro, found built-in attribute | ||
error: cannot find macro `inline!` in this scope | ||
--> $DIR/macro-path-prelude-fail-3.rs:17:5 | ||
| | ||
LL | inline!(); //~ ERROR expected a macro, found built-in attribute | ||
| ^^^^^^ | ||
LL | inline!(); //~ ERROR cannot find macro `inline!` in this scope | ||
| ^^^^^^ help: you could try the macro: `line` | ||
|
||
error: aborting due to 2 previous errors | ||
|
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,42 +1,21 @@ | ||
error[E0659]: `inline` is ambiguous | ||
--> $DIR/macro-path-prelude-shadowing.rs:24:9 | ||
| | ||
LL | inline!(); //~ ERROR `inline` is ambiguous | ||
| ^^^^^^ | ||
| | ||
note: `inline` could refer to the name imported here | ||
--> $DIR/macro-path-prelude-shadowing.rs:16:5 | ||
| | ||
LL | #[macro_use] | ||
| ^^^^^^^^^^^^ | ||
... | ||
LL | add_macro_expanded_things_to_macro_prelude!(); | ||
| ---------------------------------------------- in this macro invocation | ||
note: `inline` could also refer to the name defined here | ||
--> $DIR/macro-path-prelude-shadowing.rs:24:9 | ||
| | ||
LL | inline!(); //~ ERROR `inline` is ambiguous | ||
| ^^^^^^ | ||
= note: macro-expanded macro imports do not shadow | ||
|
||
error[E0659]: `std` is ambiguous | ||
--> $DIR/macro-path-prelude-shadowing.rs:37:9 | ||
--> $DIR/macro-path-prelude-shadowing.rs:39:9 | ||
| | ||
LL | std::panic!(); //~ ERROR `std` is ambiguous | ||
| ^^^^^^^^^^ | ||
| | ||
note: `std` could refer to the name imported here | ||
--> $DIR/macro-path-prelude-shadowing.rs:35:9 | ||
--> $DIR/macro-path-prelude-shadowing.rs:37:9 | ||
| | ||
LL | use m2::*; // glob-import user-defined `std` | ||
| ^^^^^ | ||
note: `std` could also refer to the name defined here | ||
--> $DIR/macro-path-prelude-shadowing.rs:37:9 | ||
--> $DIR/macro-path-prelude-shadowing.rs:39:9 | ||
| | ||
LL | std::panic!(); //~ ERROR `std` is ambiguous | ||
| ^^^ | ||
= note: consider adding an explicit import of `std` to disambiguate | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |