mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
Add ICE regression tests
This commit is contained in:
parent
b93ef68245
commit
f6e9fd037a
9
src/test/ui/issues/issue-68091-unicode-ident-after-if.rs
Normal file
9
src/test/ui/issues/issue-68091-unicode-ident-after-if.rs
Normal file
@ -0,0 +1,9 @@
|
||||
macro_rules! x {
|
||||
($($c:tt)*) => {
|
||||
$($c)ö* {} //~ ERROR missing condition for `if` expression
|
||||
}; //~| ERROR mismatched types
|
||||
}
|
||||
|
||||
fn main() {
|
||||
x!(if);
|
||||
}
|
18
src/test/ui/issues/issue-68091-unicode-ident-after-if.stderr
Normal file
18
src/test/ui/issues/issue-68091-unicode-ident-after-if.stderr
Normal file
@ -0,0 +1,18 @@
|
||||
error: missing condition for `if` expression
|
||||
--> $DIR/issue-68091-unicode-ident-after-if.rs:3:14
|
||||
|
|
||||
LL | $($c)ö* {}
|
||||
| ^ expected if condition here
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-68091-unicode-ident-after-if.rs:3:17
|
||||
|
|
||||
LL | $($c)ö* {}
|
||||
| ^^ expected `bool`, found `()`
|
||||
...
|
||||
LL | x!(if);
|
||||
| ------- in this macro invocation
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -0,0 +1,9 @@
|
||||
macro_rules! x {
|
||||
($($c:tt)*) => {
|
||||
$($c)ö* //~ ERROR macro expansion ends with an incomplete expression: expected expression
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
x!(!);
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user