Open
Description
This is a tracking issue for deprecating code like this:
#[trait_helper] // This helper attribute is used before it introduced by `#[derive(Trait)]` below.
#[derive(Trait)]
struct S;
Code like this works for historical reasons, but attribute expansion works in left-to-right order, so we have to use some hacks and "look into the future" to resolve trait_helper
, but that future may never actually happen in cases like
#[trait_helper]
#[remove_all_derives] // removes the `#[derive(Trait)]` below
#[derive(Trait)]
struct S;
, so the resolution in this case is unreliable.
A deprecation lint for this case is added in #79078 as warn-by-default.
Metadata
Metadata
Assignees
Labels
Area: Lints (warnings about flaws in source code) such as unused_mut.Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: Name/path resolution done by `rustc_resolve` specificallyCategory: An issue tracking the progress of sth. like the implementation of an RFCStatus: This is ready to stabilize; it may need a stabilization report and a PRRelevant to the compiler team, which will review and decide on the PR/issue.