Consistently check invalid attribute arguments #6918
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler: parser
Everything to do with the parser
compiler
General compiler. Should eventually become more specific as the issue is triaged
team:compiler
Compiler Team
Checks for attribute arguments are scattered thought the compiler code and, if done at all, the resulting errors and warnings are not consistent.
E.g., arguments of the
#[inline]
attribute are not checked at all. This compiles without any warnings or errors:E.g., the arguments of the
#[cfg]
attribute are checked both as warnings and as errors:E.g., the arguments of the
#[storage]
attribute are checked only as errors, but with different error message:The text was updated successfully, but these errors were encountered: