fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0053]: method `bar` has an incompatible type for trait 2 --> $DIR/specialization-broken.rs:16:22 3 | 4LL | default impl<U> Foo for U 5 | - this type parameter 6... 7LL | fn bar(&self) -> U { 8 | ^ 9 | | 10 | expected associated type, found type parameter `U` 11 | help: change the output type to match the trait: `impl Sized` 12 | 13note: type in trait 14 --> $DIR/specialization-broken.rs:9:22 15 | 16LL | fn bar(&self) -> impl Sized; 17 | ^^^^^^^^^^ 18 = note: expected signature `fn(&U) -> impl Sized` 19 found signature `fn(&U) -> U` 20 21error: method with return-position `impl Trait` in trait cannot be specialized 22 --> $DIR/specialization-broken.rs:16:5 23 | 24LL | fn bar(&self) -> U { 25 | ^^^^^^^^^^^^^^^^^^ 26 | 27 = note: specialization behaves in inconsistent and surprising ways with `#![feature(return_position_impl_trait_in_trait)]`, and for now is disallowed 28 29error: aborting due to 2 previous errors 30 31For more information about this error, try `rustc --explain E0053`.