-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add broken test for AFIT with RPITIT
- Loading branch information
1 parent
9a5936b
commit 0eeeea9
Showing
2 changed files
with
33 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// known-bug: #102688 | ||
// edition:2021 | ||
|
||
#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)] | ||
#![allow(incomplete_features)] | ||
|
||
use std::fmt::Debug; | ||
|
||
trait Foo { | ||
async fn baz(&self) -> impl Debug { | ||
"" | ||
} | ||
} | ||
|
||
struct Bar; | ||
|
||
impl Foo for Bar {} | ||
|
||
fn main() { | ||
let _ = Bar.baz(); | ||
} |
12 changes: 12 additions & 0 deletions
12
src/test/ui/impl-trait/in-trait/default-body-with-rpit.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,12 @@ | ||
error[E0720]: cannot resolve opaque type | ||
--> $DIR/default-body-with-rpit.rs:10:28 | ||
| | ||
LL | async fn baz(&self) -> impl Debug { | ||
| ^^^^^^^^^^ cannot resolve opaque type | ||
| | ||
= note: these returned values have a concrete "never" type | ||
= help: this error will resolve once the item's body returns a concrete type | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0720`. |