1 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Regression test for #27042. Test that a loop's label is included in its span.
15 'a: // in this case, the citation is just the `break`:
16 loop { break }; //~ ERROR mismatched types
18 'b: //~ ERROR mismatched types
19 while true { break }; // but here we cite the whole loop
21 'c: //~ ERROR mismatched types
22 for _ in None { break }; // but here we cite the whole loop
24 'd: //~ ERROR mismatched types
25 while let Some(_) = None { break };