Thank you Dylan and JohnTitor for blessing me.

This commit is contained in:
mental 2020-01-03 11:50:12 +02:00
parent b97438333e
commit c0da63951a
3 changed files with 5 additions and 4 deletions

View File

@ -8,6 +8,7 @@ macro_rules! m {
use $crate; //~ ERROR `$crate` may not be imported
use $crate as $crate; //~ ERROR expected identifier, found reserved identifier `$crate`
//~^ ERROR `$crate` may not be imported
}
}

View File

@ -19,7 +19,7 @@ LL | m!();
error: `$crate` may not be imported
--> $DIR/dollar-crate-is-keyword.rs:9:9
|
LL | use $crate; // ERROR `$crate` may not be imported
LL | use $crate;
| ^^^^^^^^^^^
...
LL | m!();
@ -35,4 +35,3 @@ LL | m!();
| ----- in this macro invocation
error: aborting due to 4 previous errors

View File

@ -1,8 +1,9 @@
error: `$crate` may not be imported
--> $DIR/import-crate-var.rs:7:5
--> $DIR/import-crate-var.rs:6:5
|
LL | m!();
| ^^^^^
|
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to previous error