-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ignore generics args in attribute paths
- Loading branch information
Showing
10 changed files
with
68 additions
and
43 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
tests/crashes/97006.rs → ...acros/genercs-in-path-with-prettry-hir.rs
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,8 @@ | ||
error: unexpected generic arguments in path | ||
--> $DIR/genercs-in-path-with-prettry-hir.rs:12:10 | ||
| | ||
LL | m!(inline<u8>); | ||
| ^^^^ | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#[prelude_import] | ||
use ::std::prelude::rust_2015::*; | ||
#[macro_use] | ||
extern crate std; | ||
//@ compile-flags: -Zunpretty=hir | ||
|
||
// issue#97006 | ||
|
||
macro_rules! m { ($attr_path: path) => { #[$attr_path] fn f() {} } } | ||
#[ | ||
|
||
inline] | ||
fn f() { } | ||
|
||
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,19 @@ | ||
// issue#123911 | ||
// issue#123912 | ||
|
||
macro_rules! m { | ||
($p: path) => { | ||
#[$p] | ||
struct S; | ||
}; | ||
} | ||
|
||
macro_rules! p { | ||
() => {}; | ||
} | ||
|
||
m!(generic<p!()>); | ||
//~^ ERROR: unexpected generic arguments in path | ||
//~| ERROR: cannot find attribute `generic` in this scope | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
tests/ui/macros/macro-expand-within-generics-in-path.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: unexpected generic arguments in path | ||
--> $DIR/macro-expand-within-generics-in-path.rs:15:11 | ||
| | ||
LL | m!(generic<p!()>); | ||
| ^^^^^^ | ||
|
||
error: cannot find attribute `generic` in this scope | ||
--> $DIR/macro-expand-within-generics-in-path.rs:15:4 | ||
| | ||
LL | m!(generic<p!()>); | ||
| ^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
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