This is the tracking issue for the dollar_crate_in_matcher future-compatibility warning and other related errors. The goal of this page is to describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our breaking change policy guidelines.
What is the warning for?
Usage of $crate in matcher.
Why was this change made?
$crate is inconsistent with the behavior of other keywords in matchers, namely that other keywords work like any other identifier, and are currently not reserved in this position.
Example
#![deny(dollar_crate_in_matcher)]
macro_rules! m {
($crate) => {};
}
Recommendations
Do not use $crate in matcher.
When will this warning become a hard error?
Unknown
Steps
Implementation history
This is the tracking issue for the
dollar_crate_in_matcherfuture-compatibility warning and other related errors. The goal of this page is to describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our breaking change policy guidelines.What is the warning for?
Usage of
$cratein matcher.Why was this change made?
$crateis inconsistent with the behavior of other keywords in matchers, namely that other keywords work like any other identifier, and are currently not reserved in this position.Example
Recommendations
Do not use
$cratein matcher.When will this warning become a hard error?
Unknown
Steps
Implementation history
$cratein macro matcher #155121