Skip to content

Commit c811acb

Browse files
author
cardigan1008
committed
feat: add unit test
1 parent 62318b3 commit c811acb

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {
2+
if true {
3+
"" //~ ERROR mismatched types [E0308]
4+
}
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/tail-expr-if-as-return.rs:3:9
3+
|
4+
LL | / if true {
5+
LL | | ""
6+
| | ^^ expected `()`, found `&str`
7+
LL | | }
8+
| |_____- expected this to be `()`
9+
10+
error: aborting due to 1 previous error
11+
12+
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)