You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix nonsensical #[path] attributes being silently allowed
Changes:
- compiler/rustc_hir/src/attrs/data_structures.rs: Extended
AttributeKind::Path variant to carry AttrStyle alongside
the Symbol, enabling inner/outer attribute distinction
- compiler/rustc_attr_parsing/src/attributes/path.rs: Updated
convert in SingleAttributeParser for PathParser to pass
cx.attr_style into AttributeKind::Path
- compiler/rustc_passes/src/check_attr.rs: Added
check_path_attribute to validate and emit errors for useless
#[path] and #![path] attributes on inline modules
- compiler/rustc_passes/src/errors.rs: Added
UselessPathAttribute and UselessInnerPathAttribute error structs
- ests/ui/attributes/path-inline-module.rs: UI tests covering
all four validation cases
- ests/ui/attributes/path-inline-module.stderr: Expected
diagnostics for the above tests
0 commit comments