Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
19
tests/ui/return/return-match-array-const.rs
Normal file
19
tests/ui/return/return-match-array-const.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
fn main() {
|
||||
//~^ NOTE: not the enclosing function body
|
||||
//~| NOTE: not the enclosing function body
|
||||
//~| NOTE: not the enclosing function body
|
||||
[(); return match 0 { n => n }];
|
||||
//~^ ERROR: return statement outside of function body [E0572]
|
||||
//~| NOTE: the return is part of this body...
|
||||
|
||||
[(); return match 0 { 0 => 0 }];
|
||||
//~^ ERROR: return statement outside of function body [E0572]
|
||||
//~| NOTE: the return is part of this body...
|
||||
|
||||
[(); return match () { 'a' => 0, _ => 0 }];
|
||||
//~^ ERROR: return statement outside of function body [E0572]
|
||||
//~| NOTE: the return is part of this body...
|
||||
//~| ERROR: mismatched types [E0308]
|
||||
//~| NOTE: expected `()`, found `char`
|
||||
//~| NOTE: this expression has type `()`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue