File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
src/test/ui/impl-trait/in-trait Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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`.
You can’t perform that action at this time.
0 commit comments