blob: 2e215aa301aecf5b0b26c522bb32898774004083 [file] [log] [blame]
// Test for #120601, which causes an ice bug cause of unexpected type
//
//@ compile-flags: -Z threads=40
//@ compare-output-by-lines
struct T;
struct Tuple(i32);
async fn foo() -> Result<(), ()> {
Unstable2(())
}
//~^^^ ERROR `async fn` is not permitted in Rust 2015
//~^^^ ERROR cannot find function, tuple struct or tuple variant `Unstable2` in this scope
async fn tuple() -> Tuple {
Tuple(1i32)
}
//~^^^ ERROR `async fn` is not permitted in Rust 2015
async fn match_() {
match tuple() {
Tuple(_) => {}
}
}
//~^^^^^ ERROR `async fn` is not permitted in Rust 2015
//~^^^^ ERROR mismatched types
fn main() {}