rust/tests/ui/issues/issue-78957.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
2.6 KiB
Plaintext
Raw Normal View History

error[E0518]: attribute should be applied to function or closure
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:5:16
|
LL | pub struct Foo<#[inline] const N: usize>;
| ^^^^^^^^^ -------------- not a function or closure
error: attribute should be applied to a function definition
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:7:16
|
LL | pub struct Bar<#[cold] const N: usize>;
| ^^^^^^^ -------------- not a function definition
|
2022-09-18 15:55:36 +00:00
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: the lint level is defined here
--> $DIR/issue-78957.rs:1:9
|
LL | #![deny(unused_attributes)]
| ^^^^^^^^^^^^^^^^^
error[E0517]: attribute should be applied to a struct, enum, or union
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:10:23
|
LL | pub struct Baz<#[repr(C)] const N: usize>;
| ^ -------------- not a struct, enum, or union
error[E0518]: attribute should be applied to function or closure
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:13:17
|
LL | pub struct Foo2<#[inline] 'a>(PhantomData<&'a ()>);
| ^^^^^^^^^ -- not a function or closure
error: attribute should be applied to a function definition
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:15:17
|
LL | pub struct Bar2<#[cold] 'a>(PhantomData<&'a ()>);
| ^^^^^^^ -- not a function definition
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0517]: attribute should be applied to a struct, enum, or union
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:18:24
|
LL | pub struct Baz2<#[repr(C)] 'a>(PhantomData<&'a ()>);
| ^ -- not a struct, enum, or union
error[E0518]: attribute should be applied to function or closure
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:21:17
|
LL | pub struct Foo3<#[inline] T>(PhantomData<T>);
| ^^^^^^^^^ - not a function or closure
error: attribute should be applied to a function definition
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:23:17
|
LL | pub struct Bar3<#[cold] T>(PhantomData<T>);
| ^^^^^^^ - not a function definition
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0517]: attribute should be applied to a struct, enum, or union
2022-01-19 15:24:49 +00:00
--> $DIR/issue-78957.rs:26:24
|
LL | pub struct Baz3<#[repr(C)] T>(PhantomData<T>);
| ^ - not a struct, enum, or union
error: aborting due to 9 previous errors
Some errors have detailed explanations: E0517, E0518.
For more information about an error, try `rustc --explain E0517`.