Add broken test for AFIT with RPITIT
This commit is contained in:
parent
9a5936b814
commit
0eeeea9414
21
src/test/ui/impl-trait/in-trait/default-body-with-rpit.rs
Normal file
21
src/test/ui/impl-trait/in-trait/default-body-with-rpit.rs
Normal 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();
|
||||
}
|
@ -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`.
|
Loading…
x
Reference in New Issue
Block a user