blob: 70471719a70db1eda85f7d318ac9f4c0adf3b326 [file]
error[E0670]: `async fn` is not permitted in Rust 2015
--> $DIR/unexpected-type-issue-120601.rs:10:1
|
LL | async fn foo() -> Result<(), ()> {
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
= help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
--> $DIR/unexpected-type-issue-120601.rs:16:1
|
LL | async fn tuple() -> Tuple {
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
= help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
--> $DIR/unexpected-type-issue-120601.rs:21:1
|
LL | async fn match_() {
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
= help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0308]: mismatched types
--> $DIR/unexpected-type-issue-120601.rs:23:9
|
LL | match tuple() {
| ------- this expression has type `impl Future<Output = Tuple>`
LL | Tuple(_) => {}
| ^^^^^^^^ expected future, found `Tuple`
|
= note: expected opaque type `impl Future<Output = Tuple>`
found struct `Tuple`
help: consider `await`ing on the `Future`
|
LL | match tuple().await {
| ++++++
error[E0425]: cannot find function, tuple struct or tuple variant `Unstable2` in this scope
--> $DIR/unexpected-type-issue-120601.rs:11:5
|
LL | Unstable2(())
| ^^^^^^^^^ not found in this scope
error: aborting due to 5 previous errors
Some errors have detailed explanations: E0308, E0425, E0670.
For more information about an error, try `rustc --explain E0308`.