Skip to content

Commit

Permalink
Add more failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Sasha Pourcelot <[email protected]>
  • Loading branch information
scrabsha committed Apr 27, 2024
1 parent 262fd7e commit 266d5cb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/ui/fail/path.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#![allow(unused)]

#[expandable::expr]
macro_rules! a {
() => {
path:::<foo>
};
}

#[expandable::expr]
macro_rules! b {
() => {
path::< <foo> >
};
}

#[expandable::expr]
macro_rules! c {
() => {
path::1
};
}

fn main() {}
17 changes: 17 additions & 0 deletions tests/ui/fail/path.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
error: Potentially invalid expansion. Expected `Self`, an identifier.
--> tests/ui/fail/path.rs:6:15
|
6 | path:::<foo>
| ^

error: Potentially invalid expansion. Expected `-`, `>`, a `{`, a literal, an identifier, an identifier.
--> tests/ui/fail/path.rs:13:17
|
13 | path::< <foo> >
| ^

error: Potentially invalid expansion. Expected `Self`, an identifier.
--> tests/ui/fail/path.rs:20:15
|
20 | path::1
| ^

0 comments on commit 266d5cb

Please sign in to comment.