rust/tests/ui/never_type/issue-52443.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
387 B
Rust
Raw Normal View History

2018-07-20 13:59:00 +00:00
fn main() {
[(); & { loop { continue } } ]; //~ ERROR mismatched types
2020-06-26 00:43:48 +00:00
2018-07-20 13:59:00 +00:00
[(); loop { break }]; //~ ERROR mismatched types
2020-06-26 00:43:48 +00:00
[(); {while true {break}; 0}];
2020-06-26 00:43:48 +00:00
//~^ WARN denote infinite loops with
[(); { for _ in 0usize.. {}; 0}];
//~^ ERROR `for` is not allowed in a `const`
//~| ERROR cannot convert
//~| ERROR mutable references
//~| ERROR cannot call
2018-07-20 13:59:00 +00:00
}