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