-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supress unhelpful diagnostics for unresolved top level attributes
- Loading branch information
1 parent
df0295f
commit e7863df
Showing
29 changed files
with
142 additions
and
233 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
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
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,16 +1,16 @@ | ||
#![derive(Copy)] //~ ERROR cannot determine resolution for the attribute macro `derive` | ||
#![derive(Copy)] | ||
//~^ ERROR `derive` attribute cannot be used at crate level | ||
|
||
#![test]//~ ERROR cannot determine resolution for the attribute macro `test` | ||
#![test] | ||
//~^ ERROR `test` attribute cannot be used at crate level | ||
|
||
#![test_case]//~ ERROR cannot determine resolution for the attribute macro `test_case` | ||
#![test_case] | ||
//~^ ERROR `test_case` attribute cannot be used at crate level | ||
|
||
#![bench]//~ ERROR cannot determine resolution for the attribute macro `bench` | ||
#![bench] | ||
//~^ ERROR `bench` attribute cannot be used at crate level | ||
|
||
#![global_allocator]//~ ERROR cannot determine resolution for the attribute macro `global_allocator` | ||
#![global_allocator] | ||
//~^ ERROR `global_allocator` attribute cannot be used at crate level | ||
|
||
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
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
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,25 +1,14 @@ | ||
error: cannot determine resolution for the attribute macro `bench` | ||
--> $DIR/issue-43106-gating-of-bench.rs:7:4 | ||
| | ||
LL | #![bench = "4100"] | ||
| ^^^^^ | ||
| | ||
= note: import resolution is stuck, try simplifying macro imports | ||
|
||
error: `bench` attribute cannot be used at crate level | ||
--> $DIR/issue-43106-gating-of-bench.rs:7:1 | ||
--> $DIR/issue-43106-gating-of-bench.rs:6:1 | ||
| | ||
LL | #![bench = "4100"] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
... | ||
LL | fn main() {} | ||
| ---- the inner attribute doesn't annotate this function | ||
LL | #![bench = "4100"] | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
help: perhaps you meant to use an outer attribute | ||
| | ||
LL - #![bench = "4100"] | ||
LL + #[bench = "4100"] | ||
LL - #![bench = "4100"] | ||
LL + #[bench = "4100"] | ||
| | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to 1 previous error | ||
|
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,7 +1,6 @@ | ||
// The non-crate level cases are in issue-43106-gating-of-builtin-attrs.rs. | ||
|
||
#![allow(soft_unstable)] | ||
#![test = "4200"] | ||
//~^ ERROR cannot determine resolution for the attribute macro `test` | ||
//~^^ ERROR `test` attribute cannot be used at crate level | ||
#![test = "4200"] | ||
//~^ ERROR `test` attribute cannot be used at crate level | ||
fn main() {} |
Oops, something went wrong.