Open
Description
Currently, custom inner attributes at the crate or outline module root do not have tokens collected:
rust/compiler/rustc_expand/src/expand.rs
Lines 718 to 728 in 5c13042
This means that code like:
#![my_attr]
struct Foo {}
fn bar() {}
will cause us to lose spans for the entire crate root / outline module. The token streams in question are never nested 'inside' something else, so we might not need the full logic in collect_tokens_trailing_token
to handle this case.
Custom inner attributes are currently unstable, so this needs to be fixed prior to stabilization in the crate root / outline module root position.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity