Skip to content

Commit 0eeeea9

Browse files
Add broken test for AFIT with RPITIT
1 parent 9a5936b commit 0eeeea9

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// known-bug: #102688
2+
// edition:2021
3+
4+
#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)]
5+
#![allow(incomplete_features)]
6+
7+
use std::fmt::Debug;
8+
9+
trait Foo {
10+
async fn baz(&self) -> impl Debug {
11+
""
12+
}
13+
}
14+
15+
struct Bar;
16+
17+
impl Foo for Bar {}
18+
19+
fn main() {
20+
let _ = Bar.baz();
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0720]: cannot resolve opaque type
2+
--> $DIR/default-body-with-rpit.rs:10:28
3+
|
4+
LL | async fn baz(&self) -> impl Debug {
5+
| ^^^^^^^^^^ cannot resolve opaque type
6+
|
7+
= note: these returned values have a concrete "never" type
8+
= help: this error will resolve once the item's body returns a concrete type
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0720`.

0 commit comments

Comments
 (0)