gccrs: Handle `async` functions in traits
[official-gcc.git] / gcc / testsuite / rust / compile / break2.rs
bloba8af47ae59b749526aa1db3bbcd29367daddcebe
1 // ErrorCode::E0571
2 fn main() {
3     let mut a = 1;
4     let mut b = 1;
6     let mut c;
7     while b > 10 {
8         if (b == 2) {
9             break b; // { dg-error "can only .break. with a value inside a .loop. block" }
10         }
11         c = a + b;
12         a = b;
13         b = c;
14     }