2022-09-02 16:02:59 -05:00
|
|
|
#![feature(return_position_impl_trait_in_trait)]
|
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
|
|
|
struct Wrapper<T>(T);
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn bar() -> Wrapper<impl Sized>;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo for () {
|
|
|
|
fn bar() -> i32 { 0 }
|
2022-09-09 16:57:38 -05:00
|
|
|
//~^ ERROR method `bar` has an incompatible return type for trait
|
2022-09-02 16:02:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|