Tracking Issue for future-incompatibility lint `dollar_crate_in_matcher`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
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
- Implement the lint
- Raise lint level to deny
- Change the lint to report in dependencies
- Switch to a hard error
Implementation history
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the tracking issue's warning example, recommendations, checklist, and the implementation history in PR #155121. The work is complete when the listed lint milestones are addressed, including implementation, lint-level changes, dependency reporting, and the eventual hard error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100