Skip to content

Add E0452 error explanation #30201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,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;
Expand All @@ -1943,6 +1943,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:
Expand Down Expand Up @@ -2219,7 +2236,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
Expand Down