]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51714.rs
Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24a96cd369'
[rust.git] / src / test / ui / issues / issue-51714.rs
1 fn main() {
2     |_:  [_; return || {}] | {};
3     //~^ ERROR return statement outside of function body
4
5     [(); return || {}];
6     //~^ ERROR return statement outside of function body
7
8     [(); return |ice| {}];
9     //~^ ERROR return statement outside of function body
10
11     [(); return while let Some(n) = Some(0) {}];
12     //~^ ERROR return statement outside of function body
13     //~| ERROR `while` is not allowed in a `const`
14 }