Change:
The warning was introduced in to avoid breakage from .
Presumably the next step is to make this an error by default.
Triage: Digging through all the linked issues is tough, and it's not clear to me exactly what this warning is or does. can you maybe elaborate a little?
This needs to be turned into an error, i.e. behave like basically:
Relevant code is here: Should be easy to turn that into and then do a crater run.

Discussion:
self.r .session <del> .struct_span_warn(item.span, "`$crate` may not be imported") .note( "`use $crate;` was erroneously allowed and  will become a hard error in a future release", ) </del> <ins> .struct_span_err(item.span, "`$crate` may not be imported") </ins> .emit(); } }

struct $crate {} //~ ERROR expected identifier, found reserved identifier `$crate` } <del> use $crate; // OK //~^ WARN `$crate` may not be imported </del> <ins> use $crate; //~ ERROR `$crate` may not be imported </ins> use $crate as $crate; //~ ERROR expected identifier, found reserved identifier `$crate` <del> //~^ WARN `$crate` may not be imported </del> <ins> //~^ ERROR `$crate` may not be imported </ins> } }

| ----- in this macro invocation error: expected identifier, found reserved identifier `$crate` <del> --> $DIR/dollar-crate-is-keyword.rs:11:23 </del> <ins> --> $DIR/dollar-crate-is-keyword.rs:10:23 </ins> | LL |         use $crate as $crate; |                       ^^^^^^ expected identifier, found reserved identifier

LL | m!(); | ----- in this macro invocation <del> warning: `$crate` may not be imported </del> <ins> error: `$crate` may not be imported </ins> --> $DIR/dollar-crate-is-keyword.rs:9:9 | <del> LL |         use $crate; // OK </del> <ins> LL |         use $crate; </ins> |         ^^^^^^^^^^^ ... LL | m!(); | ----- in this macro invocation <del> | = note: `use $crate;` was erroneously allowed and will become a hard error in a future release warning: `$crate` may not be imported --> $DIR/dollar-crate-is-keyword.rs:11:9 </del> <ins> error: `$crate` may not be imported --> $DIR/dollar-crate-is-keyword.rs:10:9 </ins> | LL |         use $crate as $crate; |         ^^^^^^^^^^^^^^^^^^^^^ ... LL | m!(); | ----- in this macro invocation <del> | = note: `use $crate;` was erroneously allowed and will become a hard error in a future release error: aborting due to 2 previous errors </del> <ins> error: aborting due to 4 previous errors </ins>

<del> // check-pass </del> // aux-build:import_crate_var.rs #[macro_use] extern crate import_crate_var; fn main() { m!(); <del> //~^ WARN `$crate` may not be imported //~| NOTE `use $crate;` was erroneously allowed and will become a hard error </del> <ins> //~^ ERROR `$crate` may not be imported </ins> }

<del> warning: `$crate` may not be imported --> $DIR/import-crate-var.rs:7:5 </del> <ins> error: `$crate` may not be imported --> $DIR/import-crate-var.rs:6:5 </ins> | LL |     m!(); |     ^^^^^ | <del> = note: `use $crate;` was erroneously allowed and will become a hard error in a future release = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) </del> <ins> = 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 </ins>