Skip to content

Commit 24a1633

Browse files
committed
Rollup merge of #30201 - GuillaumeGomez:patch-3, r=Manishearth
r? @Manishearth
2 parents 56a1f51 + 67eaa9e commit 24a1633

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/librustc/diagnostics.rs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ fn main() {
19481948
19491949
You cannot directly use a dereference operation whilst initializing a constant
19501950
or a static. To fix this error, restructure your code to avoid this dereference,
1951-
perharps moving it inline:
1951+
perhaps moving it inline:
19521952
19531953
```
19541954
use std::ops::Deref;
@@ -1967,6 +1967,23 @@ fn main() {
19671967
```
19681968
"##,
19691969

1970+
E0452: r##"
1971+
An invalid lint attribute has been given. Erroneous code example:
1972+
1973+
```
1974+
#![allow(foo = "")] // error: malformed lint attribute
1975+
```
1976+
1977+
Lint attributes only accept a list of identifiers (where each identifier is a
1978+
lint name). Ensure the attribute is of this form:
1979+
1980+
```
1981+
#![allow(foo)] // ok!
1982+
// or:
1983+
#![allow(foo, foo2)] // ok!
1984+
```
1985+
"##,
1986+
19701987
E0492: r##"
19711988
A borrow of a constant containing interior mutability was attempted. Erroneous
19721989
code example:
@@ -2242,7 +2259,6 @@ register_diagnostics! {
22422259
E0314, // closure outlives stack frame
22432260
E0315, // cannot invoke closure outside of its lifetime
22442261
E0316, // nested quantification of lifetimes
2245-
E0452, // malformed lint attribute
22462262
E0453, // overruled by outer forbid
22472263
E0471, // constant evaluation error: ..
22482264
E0472, // asm! is unsupported on this target

0 commit comments

Comments
 (0)