Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve: Prohibit use of imported non-macro attributes
- Loading branch information
1 parent
e1d1487
commit bf1e70c
Showing
5 changed files
with
42 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// edition:2018 | ||
|
||
#![feature(uniform_paths)] | ||
|
||
// Built-in attribute | ||
use inline as imported_inline; | ||
|
||
#[imported_inline] //~ ERROR cannot use a built-in attribute through an import | ||
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: cannot use a built-in attribute through an import | ||
--> $DIR/prelude-fail-2.rs:8:3 | ||
| | ||
LL | #[imported_inline] //~ ERROR cannot use a built-in attribute through an import | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
note: the built-in attribute imported here | ||
--> $DIR/prelude-fail-2.rs:6:5 | ||
| | ||
LL | use inline as imported_inline; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 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