Built-in attributes are treated differently vs prelude attributes, unstable built-in attributes can name-collide with stable macro, and built-in attributes can break back-compat #134963
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-discussion
Category: Discussion or questions that doesn't represent real issues.
I-compiler-nominated
Nominated for discussion during a compiler team meeting.
I-lang-nominated
Nominated for discussion during a lang team meeting.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Example breakage: Broken build after updating:
coverage
is ambiguous; ambiguous because of a name conflict with a builtin attributeExample code:
Originally posted by @ehuss in #121157
This is an interesting problem that has three aspects:
#[coverage(..)]
are handled differently versus prelude attributes like#[test]
, including name resolution.#[coverage]
) can still break stable code without any feature gates (e.g.use
of a user-defined macro of the same name as the newly added built-in attribute).It might be tricky to change (or not possible), mostly opened this issue for awareness.
The text was updated successfully, but these errors were encountered: