diff options
| -rw-r--r-- | src/librustc/diagnostics.rs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index b09dbe161f4..86dd363993a 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -1948,7 +1948,7 @@ fn main() { You cannot directly use a dereference operation whilst initializing a constant or a static. To fix this error, restructure your code to avoid this dereference, -perharps moving it inline: +perhaps moving it inline: ``` use std::ops::Deref; @@ -1967,6 +1967,23 @@ fn main() { ``` "##, +E0452: r##" +An invalid lint attribute has been given. Erroneous code example: + +``` +#![allow(foo = "")] // error: malformed lint attribute +``` + +Lint attributes only accept a list of identifiers (where each identifier is a +lint name). Ensure the attribute is of this form: + +``` +#![allow(foo)] // ok! +// or: +#![allow(foo, foo2)] // ok! +``` +"##, + E0492: r##" A borrow of a constant containing interior mutability was attempted. Erroneous code example: @@ -2242,7 +2259,6 @@ register_diagnostics! { E0314, // closure outlives stack frame E0315, // cannot invoke closure outside of its lifetime E0316, // nested quantification of lifetimes - E0452, // malformed lint attribute E0453, // overruled by outer forbid E0471, // constant evaluation error: .. E0472, // asm! is unsupported on this target |
