2023-03-20 16:19:20 -05:00
|
|
|
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
|
|
|
|
// revisions: current next
|
|
|
|
|
2023-03-04 12:36:02 -06:00
|
|
|
#![feature(return_position_impl_trait_in_trait)]
|
|
|
|
|
|
|
|
trait MyTrait {
|
|
|
|
fn foo(&self) -> impl Sized;
|
|
|
|
fn bar(&self) -> impl Sized;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl MyTrait for i32 {
|
2023-03-20 16:19:20 -05:00
|
|
|
//~^ ERROR not all trait items implemented, missing: `foo`
|
2023-03-04 12:36:02 -06:00
|
|
|
fn bar(&self) -> impl Sized {
|
|
|
|
self.foo()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|