]>
git.proxmox.com Git - rustc.git/blob - src/test/parse-fail/range_inclusive_gate.rs
1 // Copyright 2016 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 // Make sure that #![feature(inclusive_range_syntax)] is required.
13 // #![feature(inclusive_range_syntax, inclusive_range)]
16 () => { for _ in 1...10 {}
} //~ ERROR inclusive range syntax is experimental
23 for _
in 1...10 {}
//~ ERROR inclusive range syntax is experimental
27 macro_rules
! n { () => {}
}
30 () => { for _ in 1...10 {}
} //~ ERROR inclusive range syntax is experimental
39 for _
in 1...10 {}
//~ ERROR inclusive range syntax is experimental
47 macro_rules
! p { () => {}
}
55 for _
in 1...10 {}
//~ ERROR inclusive range syntax is experimental
63 for _
in 1...10 {}
//~ ERROR inclusive range syntax is experimental
64 for _
in ...10 {}
//~ ERROR inclusive range syntax is experimental
66 f(); // not allowed in cfg'ed functions
68 m
!(); // not allowed in macros
69 n
!(); // not allowed in cfg'ed macros
70 o
!(); // not allowed in macros that output cfgs
71 p
!(); // not allowed in cfg'ed macros that output cfgs