File tree 3 files changed +16
-7
lines changed
3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -942,7 +942,8 @@ crate fn check_builtin_attribute(
942
942
// Some of previously accepted forms were used in practice,
943
943
// report them as warnings for now.
944
944
let should_warn = |name| name == sym:: doc || name == sym:: ignore ||
945
- name == sym:: inline || name == sym:: link;
945
+ name == sym:: inline || name == sym:: link ||
946
+ name == sym:: test || name == sym:: bench;
946
947
947
948
match attr. parse_meta ( sess) {
948
949
Ok ( meta) => if !should_skip ( name) && !template. compatible ( & meta. node ) {
Original file line number Diff line number Diff line change 1
- error: malformed ` bench` attribute input
1
+ warning: attribute must be of the form `#[ bench]`
2
2
--> $DIR/issue-43106-gating-of-bench.rs:15:1
3
3
|
4
4
LL | #![bench = "4100"]
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[bench]`
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = note: `#[warn(ill_formed_attribute_input)]` on by default
8
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9
+ = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
6
10
7
11
error[E0601]: `main` function not found in crate `issue_43106_gating_of_bench`
8
12
|
9
13
= note: consider adding a `main` function to `$DIR/issue-43106-gating-of-bench.rs`
10
14
11
- error: aborting due to 2 previous errors
15
+ error: aborting due to previous error
12
16
13
17
For more information about this error, try `rustc --explain E0601`.
Original file line number Diff line number Diff line change 1
- error: malformed ` test` attribute input
1
+ warning: attribute must be of the form `#[ test]`
2
2
--> $DIR/issue-43106-gating-of-test.rs:10:1
3
3
|
4
4
LL | #![test = "4200"]
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[test]`
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = note: `#[warn(ill_formed_attribute_input)]` on by default
8
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9
+ = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
6
10
7
11
error[E0601]: `main` function not found in crate `issue_43106_gating_of_test`
8
12
|
9
13
= note: consider adding a `main` function to `$DIR/issue-43106-gating-of-test.rs`
10
14
11
- error: aborting due to 2 previous errors
15
+ error: aborting due to previous error
12
16
13
17
For more information about this error, try `rustc --explain E0601`.
You can’t perform that action at this time.
0 commit comments