]> git.lizzy.rs Git - rust.git/blob - src/test/ui/loops/loop-break-value-no-repeat.rs
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
[rust.git] / src / test / ui / loops / loop-break-value-no-repeat.rs
1 #![allow(unused_variables)]
2
3 use std::ptr;
4
5 // Test that we only report **one** error here and that is that
6 // `break` with an expression is illegal in this context. In
7 // particular, we don't report any mismatched types error, which is
8 // besides the point.
9
10 fn main() {
11     for _ in &[1,2,3] {
12         break 22 //~ ERROR `break` with value from a `for` loop
13     }
14 }