File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Expand file tree Collapse file tree 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(
942942 // Some of previously accepted forms were used in practice,
943943 // report them as warnings for now.
944944 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;
946947
947948 match attr. parse_meta ( sess) {
948949 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]`
22 --> $DIR/issue-43106-gating-of-bench.rs:15:1
33 |
44LL | #![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>
610
711error[E0601]: `main` function not found in crate `issue_43106_gating_of_bench`
812 |
913 = note: consider adding a `main` function to `$DIR/issue-43106-gating-of-bench.rs`
1014
11- error: aborting due to 2 previous errors
15+ error: aborting due to previous error
1216
1317For 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]`
22 --> $DIR/issue-43106-gating-of-test.rs:10:1
33 |
44LL | #![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>
610
711error[E0601]: `main` function not found in crate `issue_43106_gating_of_test`
812 |
913 = note: consider adding a `main` function to `$DIR/issue-43106-gating-of-test.rs`
1014
11- error: aborting due to 2 previous errors
15+ error: aborting due to previous error
1216
1317For more information about this error, try `rustc --explain E0601`.
You can’t perform that action at this time.
0 commit comments