|
| 1 | +error[E0518]: attribute should be applied to function or closure |
| 2 | + --> $DIR/issue-78957.rs:6:16 |
| 3 | + | |
| 4 | +LL | pub struct Foo<#[inline] const N: usize>; |
| 5 | + | ^^^^^^^^^ - not a function or closure |
| 6 | + |
| 7 | +error: attribute should be applied to a function |
| 8 | + --> $DIR/issue-78957.rs:8:16 |
| 9 | + | |
| 10 | +LL | pub struct Bar<#[cold] const N: usize>; |
| 11 | + | ^^^^^^^ - not a function |
| 12 | + | |
| 13 | +note: the lint level is defined here |
| 14 | + --> $DIR/issue-78957.rs:1:9 |
| 15 | + | |
| 16 | +LL | #![deny(unused_attributes)] |
| 17 | + | ^^^^^^^^^^^^^^^^^ |
| 18 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 19 | + |
| 20 | +error[E0517]: attribute should be applied to a struct, enum, or union |
| 21 | + --> $DIR/issue-78957.rs:11:23 |
| 22 | + | |
| 23 | +LL | pub struct Baz<#[repr(C)] const N: usize>; |
| 24 | + | ^ - not a struct, enum, or union |
| 25 | + |
| 26 | +error[E0518]: attribute should be applied to function or closure |
| 27 | + --> $DIR/issue-78957.rs:14:17 |
| 28 | + | |
| 29 | +LL | pub struct Foo2<#[inline] 'a>(PhantomData<&'a ()>); |
| 30 | + | ^^^^^^^^^ -- not a function or closure |
| 31 | + |
| 32 | +error: attribute should be applied to a function |
| 33 | + --> $DIR/issue-78957.rs:16:17 |
| 34 | + | |
| 35 | +LL | pub struct Bar2<#[cold] 'a>(PhantomData<&'a ()>); |
| 36 | + | ^^^^^^^ -- not a function |
| 37 | + | |
| 38 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 39 | + |
| 40 | +error[E0517]: attribute should be applied to a struct, enum, or union |
| 41 | + --> $DIR/issue-78957.rs:19:24 |
| 42 | + | |
| 43 | +LL | pub struct Baz2<#[repr(C)] 'a>(PhantomData<&'a ()>); |
| 44 | + | ^ -- not a struct, enum, or union |
| 45 | + |
| 46 | +error[E0518]: attribute should be applied to function or closure |
| 47 | + --> $DIR/issue-78957.rs:22:17 |
| 48 | + | |
| 49 | +LL | pub struct Foo3<#[inline] T>(PhantomData<T>); |
| 50 | + | ^^^^^^^^^ - not a function or closure |
| 51 | + |
| 52 | +error: attribute should be applied to a function |
| 53 | + --> $DIR/issue-78957.rs:24:17 |
| 54 | + | |
| 55 | +LL | pub struct Bar3<#[cold] T>(PhantomData<T>); |
| 56 | + | ^^^^^^^ - not a function |
| 57 | + | |
| 58 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 59 | + |
| 60 | +error[E0517]: attribute should be applied to a struct, enum, or union |
| 61 | + --> $DIR/issue-78957.rs:27:24 |
| 62 | + | |
| 63 | +LL | pub struct Baz3<#[repr(C)] T>(PhantomData<T>); |
| 64 | + | ^ - not a struct, enum, or union |
| 65 | + |
| 66 | +error: aborting due to 9 previous errors |
| 67 | + |
| 68 | +Some errors have detailed explanations: E0517, E0518. |
| 69 | +For more information about an error, try `rustc --explain E0517`. |
0 commit comments