blob: 90fcb2309b34804631e1f562fe4e8fcff901e130 [file] [log] [blame]
#![feature(cfg_select)]
#![crate_type = "lib"]
// Check that parse errors in arms that are not selected are still reported.
fn print() {
println!(cfg_select! {
false => { 1 ++ 2 }
//~^ ERROR Rust has no postfix increment operator
_ => { "not unix" }
});
}
cfg_select! {
false => { fn foo() { 1 +++ 2 } }
//~^ ERROR Rust has no postfix increment operator
_ => {}
}