Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove some more
#![feature(custom_attribute)]
s
- Loading branch information
1 parent
ea4ad55
commit 6a66491
Showing
9 changed files
with
89 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
// When denying at the crate level, be sure to not get random warnings from the | ||
// injected intrinsics by the compiler. | ||
|
||
#![deny(unused_attributes)] | ||
#![allow(dead_code)] | ||
#![feature(custom_attribute)] | ||
#[ab_isize="stdcall"] extern {} //~ ERROR attribute `ab_isize` is currently unknown | ||
|
||
#[ab_isize="stdcall"] extern {} //~ ERROR unused attribute | ||
|
||
#[fixed_stack_segment] fn f() {} //~ ERROR unused attribute | ||
#[fixed_stack_segment] fn f() {} //~ ERROR attribute `fixed_stack_segment` is currently unknown | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
error: unused attribute | ||
--> $DIR/lint-obsolete-attr.rs:8:1 | ||
error[E0658]: The attribute `fixed_stack_segment` is currently unknown to the compiler and may have meaning added to it in the future | ||
--> $DIR/lint-obsolete-attr.rs:6:3 | ||
| | ||
LL | #[ab_isize="stdcall"] extern {} | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/lint-obsolete-attr.rs:4:9 | ||
LL | #[fixed_stack_segment] fn f() {} | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
LL | #![deny(unused_attributes)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/29642 | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: unused attribute | ||
--> $DIR/lint-obsolete-attr.rs:10:1 | ||
error[E0658]: The attribute `ab_isize` is currently unknown to the compiler and may have meaning added to it in the future | ||
--> $DIR/lint-obsolete-attr.rs:4:3 | ||
| | ||
LL | #[fixed_stack_segment] fn f() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | #[ab_isize="stdcall"] extern {} | ||
| ^^^^^^^^ | ||
| | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/29642 | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
// When denying at the crate level, be sure to not get random warnings from the | ||
// injected intrinsics by the compiler. | ||
|
||
#![feature(custom_attribute)] | ||
#![deny(unused_attributes)] | ||
#![feature(custom_inner_attributes)] | ||
|
||
#![mutable_doc] //~ ERROR unused attribute | ||
#![mutable_doc] //~ ERROR attribute `mutable_doc` is currently unknown | ||
|
||
#[dance] mod a {} //~ ERROR unused attribute | ||
#[dance] mod a {} //~ ERROR attribute `dance` is currently unknown | ||
|
||
#[dance] fn main() {} //~ ERROR unused attribute | ||
#[dance] fn main() {} //~ ERROR attribute `dance` is currently unknown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
error: unused attribute | ||
--> $DIR/lint-unknown-attr.rs:9:1 | ||
error[E0658]: The attribute `mutable_doc` is currently unknown to the compiler and may have meaning added to it in the future | ||
--> $DIR/lint-unknown-attr.rs:6:4 | ||
| | ||
LL | #[dance] mod a {} | ||
| ^^^^^^^^ | ||
LL | #![mutable_doc] | ||
| ^^^^^^^^^^^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/lint-unknown-attr.rs:5:9 | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/29642 | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error[E0658]: The attribute `dance` is currently unknown to the compiler and may have meaning added to it in the future | ||
--> $DIR/lint-unknown-attr.rs:8:3 | ||
| | ||
LL | #![deny(unused_attributes)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
LL | #[dance] mod a {} | ||
| ^^^^^ | ||
| | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/29642 | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: unused attribute | ||
--> $DIR/lint-unknown-attr.rs:11:1 | ||
error[E0658]: The attribute `dance` is currently unknown to the compiler and may have meaning added to it in the future | ||
--> $DIR/lint-unknown-attr.rs:10:3 | ||
| | ||
LL | #[dance] fn main() {} | ||
| ^^^^^^^^ | ||
|
||
error: unused attribute | ||
--> $DIR/lint-unknown-attr.rs:7:1 | ||
| ^^^^^ | ||
| | ||
LL | #![mutable_doc] | ||
| ^^^^^^^^^^^^^^^ | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/29642 | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 18 additions & 8 deletions
26
src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,49 @@ | ||
error[E0658]: The attribute `rustfmt` is currently unknown to the compiler and may have meaning added to it in the future | ||
--> $DIR/tool-attributes-misplaced-1.rs:8:3 | ||
| | ||
LL | #[rustfmt] | ||
| ^^^^^^^ | ||
| | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/29642 | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: cannot find derive macro `rustfmt` in this scope | ||
--> $DIR/tool-attributes-misplaced-1.rs:6:10 | ||
--> $DIR/tool-attributes-misplaced-1.rs:4:10 | ||
| | ||
LL | #[derive(rustfmt)] | ||
| ^^^^^^^ | ||
|
||
error: cannot find macro `rustfmt!` in this scope | ||
--> $DIR/tool-attributes-misplaced-1.rs:15:5 | ||
--> $DIR/tool-attributes-misplaced-1.rs:14:5 | ||
| | ||
LL | rustfmt!(); | ||
| ^^^^^^^ | ||
|
||
error[E0573]: expected type, found tool module `rustfmt` | ||
--> $DIR/tool-attributes-misplaced-1.rs:3:10 | ||
--> $DIR/tool-attributes-misplaced-1.rs:1:10 | ||
| | ||
LL | type A = rustfmt; | ||
| ^^^^^^^ not a type | ||
|
||
error[E0573]: expected type, found tool attribute `rustfmt::skip` | ||
--> $DIR/tool-attributes-misplaced-1.rs:4:10 | ||
--> $DIR/tool-attributes-misplaced-1.rs:2:10 | ||
| | ||
LL | type B = rustfmt::skip; | ||
| ^^^^^^^^^^^^^ not a type | ||
|
||
error[E0423]: expected value, found tool module `rustfmt` | ||
--> $DIR/tool-attributes-misplaced-1.rs:14:5 | ||
--> $DIR/tool-attributes-misplaced-1.rs:13:5 | ||
| | ||
LL | rustfmt; | ||
| ^^^^^^^ not a value | ||
|
||
error[E0423]: expected value, found tool attribute `rustfmt::skip` | ||
--> $DIR/tool-attributes-misplaced-1.rs:17:5 | ||
--> $DIR/tool-attributes-misplaced-1.rs:16:5 | ||
| | ||
LL | rustfmt::skip; | ||
| ^^^^^^^^^^^^^ not a value | ||
|
||
error: aborting due to 6 previous errors | ||
error: aborting due to 7 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0423`. | ||
Some errors have detailed explanations: E0423, E0658. | ||
For more information about an error, try `rustc --explain E0423`. |