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