[CRATER] Deny almost all attributes on macro calls#158816
Conversation
|
@bors try |
This comment has been minimized.
This comment has been minimized.
[CRATER] Deny almost all attributes on macro calls
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
A relevant old issue - #63221. |
|
🎉 Experiment
Footnotes
|
|
|
||
| impl AllowedTargets<'_> { | ||
| pub(crate) fn is_allowed(&self, target: Target) -> AllowedResult { | ||
| if target == Target::MacroCall { |
There was a problem hiding this comment.
This should be correct, but I'd prefer to implement this by explicitly listing Error(Target::MacroCall) in all attributes that are AllowedTargets::AllowListWarnRest if we're actually going to merge this. That makes it more explicit what the allowed targets are for each attribute
There was a problem hiding this comment.
Right, we are not merging this. I just want to know how many crates are doing this.
|
So the big crates that make this mistake are (old versions of?) That's a lot of breakage, probably too much to merge this, but also that so many big crates are making this mistake is worrying |
It is not yet time to start erroring on these, but there are no PRs queued up in crater right now so I'm seizing the opportunity to check the fallout.
This doesn't error for doc/diagnostic/rustc_dummy etc attributes, those are still allowed.
@JonathanBrouwer does this appear correct?