diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-1962.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-1962.rs b/src/test/ui/issues/issue-1962.rs new file mode 100644 index 000000000..71e874100 --- /dev/null +++ b/src/test/ui/issues/issue-1962.rs @@ -0,0 +1,10 @@ +// compile-flags: -D while-true +// run-rustfix + +fn main() { + let mut i = 0; + 'a: while true { //~ ERROR denote infinite loops with `loop + i += 1; + if i == 5 { break 'a; } + } +} |