feat: add unit test

This commit is contained in:
cardigan1008 2024-05-16 21:10:07 +08:00
parent 62318b38ef
commit c811acb1f3
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,5 @@
fn main() {
if true {
"" //~ ERROR mismatched types [E0308]
}
}

View File

@ -0,0 +1,12 @@
error[E0308]: mismatched types
--> $DIR/tail-expr-if-as-return.rs:3:9
|
LL | / if true {
LL | | ""
| | ^^ expected `()`, found `&str`
LL | | }
| |_____- expected this to be `()`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.