Conversation
|
Some changes occurred in compiler/rustc_attr_parsing |
| this: used, | ||
| other: unused, | ||
| this: unused, | ||
| other: used, |
There was a problem hiding this comment.
This order was inconsistent with the order in Warn and WarnButFutureError
|
Aren't these technically breaking changes? |
|
Why is this a breaking change? I think erroring/warning on a different attribute should be fine right? |
|
Well in the cases where it warns, it compiles. Let's say there are two inline attributes, one says always the other never. It will warn about the innermost, apply the outermost, and be inlined. If we make the attribute keep the innermost, it warns about the outermost and not inline |
|
Ooh right, yeah you're right, good catch. |
This comment has been minimized.
This comment has been minimized.
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Remove `ATTRIBUTE_ORDER`
6bafe7f to
698abd4
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
This comment has been minimized.
This comment has been minimized.
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
698abd4 to
976c53f
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
🎉 Experiment
Footnotes
|
|
All 4 regressed and 3 fixed are spurious. @rust-lang/lang Previously when multiple of the same attribute were present, we would FCW and then sometimes pick the first (outermost) and sometimes pick the second (innermost) attribute to keep, depending on the exact attribute. Most attributes already picked the first (outermost) attribute to keep, a minority picked the second (innermost). This PR makes this consistent, always keeping the first (outermost) and warning on the second (innermost) attribute. For example, this PR changes the meaning of this program, previously we would pick #[export_name = "exported_symbol_name"]
#[export_name = "exported_symbol_name2"]
fn ...This affects the following non-rustc attributes:
|
r? @jdonszelmann
There's only a few attributes that use
KeepInnermostand I think I like the consistency of just making them allKeepOutermostThis will soft-conflict with all attribute-related PRs, if you send
r=meI'll rebase & merge it at a safe time