-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.
Description
The compiler does not warn about annotations it does not recognize. I recently noticed some code annotated with several instances of #[incline]
. Those annotations had been sitting there unnoticed for over a year. It would be nice if the compiler would emit a warning.
As discussed on IRC, one way this might be implemented would be marking annotations as 'used' when they are used, and then do a pass very late in compilation that checks for unused annotations. This would free the lint pass from having a list of valid annotations and their semantics.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.