forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#105318 - compiler-errors:issue-105304, r=ja…
…ckh726 Make `get_impl_future_output_ty` work with AFIT Fixes rust-lang#105304
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/test/ui/async-await/in-trait/return-type-suggestion.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// edition: 2021 | ||
|
||
#![feature(async_fn_in_trait)] | ||
//~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes | ||
|
||
trait A { | ||
async fn e() { | ||
Ok(()) | ||
//~^ ERROR mismatched types | ||
//~| HELP consider using a semicolon here | ||
} | ||
} | ||
|
||
fn main() {} |
23 changes: 23 additions & 0 deletions
23
src/test/ui/async-await/in-trait/return-type-suggestion.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/return-type-suggestion.rs:3:12 | ||
| | ||
LL | #![feature(async_fn_in_trait)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/return-type-suggestion.rs:8:9 | ||
| | ||
LL | Ok(()) | ||
| ^^^^^^- help: consider using a semicolon here: `;` | ||
| | | ||
| expected `()`, found enum `Result` | ||
| | ||
= note: expected unit type `()` | ||
found enum `Result<(), _>` | ||
|
||
error: aborting due to previous error; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0308`. |