blob: ed563bb0c4e0ce4dc732085035430741f5b5184d [file] [log] [blame]
error[E0670]: `async fn` is not permitted in Rust 2015
--> $DIR/unexpected-type-issue-120601.rs:9: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:15: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:20: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[E0425]: cannot find function, tuple struct or tuple variant `Unstable2` in this scope
--> $DIR/unexpected-type-issue-120601.rs:10:5
|
LL | Unstable2(())
| ^^^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> $DIR/unexpected-type-issue-120601.rs:22: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: aborting due to 5 previous errors
Some errors have detailed explanations: E0308, E0425, E0670.
For more information about an error, try `rustc --explain E0308`.