• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
2 // revisions: current next
3 
4 #![feature(return_position_impl_trait_in_trait)]
5 
6 trait MyTrait {
foo(&self) -> impl Sized7     fn foo(&self) -> impl Sized;
bar(&self) -> impl Sized8     fn bar(&self) -> impl Sized;
9 }
10 
11 impl MyTrait for i32 {
12     //~^ ERROR not all trait items implemented, missing: `foo`
bar(&self) -> impl Sized13     fn bar(&self) -> impl Sized {
14         self.foo()
15     }
16 }
17 
main()18 fn main() {}
19