Skip to content

Commit

Permalink
Add ICE regression tests
Browse files Browse the repository at this point in the history
(cherry picked from commit f6e9fd0)
  • Loading branch information
estebank authored and cuviper committed Jan 17, 2020
1 parent ec4a464 commit 84eb3b2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui/issues/issue-68091-unicode-ident-after-if.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
macro_rules! x {
($($c:tt)*) => {
$($c)ö* {} //~ ERROR missing condition for `if` expression
};
}

fn main() {
x!(if);
}
8 changes: 8 additions & 0 deletions src/test/ui/issues/issue-68091-unicode-ident-after-if.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: missing condition for `if` expression
--> $DIR/issue-68091-unicode-ident-after-if.rs:3:14
|
LL | $($c)ö* {}
| ^ expected if condition here

error: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
macro_rules! x {
($($c:tt)*) => {
$($c)ö* //~ ERROR macro expansion ends with an incomplete expression: expected expression
};
}

fn main() {
x!(!);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: macro expansion ends with an incomplete expression: expected expression
--> $DIR/issue-68092-unicode-ident-after-incomplete-expr.rs:3:14
|
LL | $($c)ö*
| ^ expected expression

error: aborting due to previous error

0 comments on commit 84eb3b2

Please sign in to comment.