Add broken test for AFIT with RPITIT

This commit is contained in:
Michael Goulet 2022-10-05 03:52:38 +00:00
parent 9a5936b814
commit 0eeeea9414
2 changed files with 33 additions and 0 deletions

View File

@ -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();
}

View File

@ -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`.