]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51714.rs
Rollup merge of #100168 - WaffleLapkin:improve_diagnostics_for_missing_type_in_a_cons...
[rust.git] / src / test / ui / issues / issue-51714.rs
1 fn main() {
2 //~^ NOTE: not the enclosing function body
3 //~| NOTE: not the enclosing function body
4 //~| NOTE: not the enclosing function body
5 //~| NOTE: not the enclosing function body
6     |_:  [_; return || {}] | {};
7     //~^ ERROR: return statement outside of function body [E0572]
8     //~| NOTE: the return is part of this body...
9
10     [(); return || {}];
11     //~^ ERROR: return statement outside of function body [E0572]
12     //~| NOTE: the return is part of this body...
13
14     [(); return |ice| {}];
15     //~^ ERROR: return statement outside of function body [E0572]
16     //~| NOTE: the return is part of this body...
17
18     [(); return while let Some(n) = Some(0) {}];
19     //~^ ERROR: return statement outside of function body [E0572]
20     //~| NOTE: the return is part of this body...
21 }