2020-06-11 19:41:16 -05:00
|
|
|
trait Trait {
|
|
|
|
fn func1() -> Struct1<Self>; //~ ERROR E0277
|
|
|
|
fn func2<'a>() -> Struct2<'a, Self>; //~ ERROR E0277
|
|
|
|
fn func3() -> Struct3<Self>; //~ ERROR E0277
|
2020-06-16 19:24:16 -05:00
|
|
|
fn func4() -> Struct4<Self>; //~ ERROR E0277
|
2020-06-11 19:41:16 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
struct Struct1<T>{
|
|
|
|
_t: std::marker::PhantomData<*const T>,
|
|
|
|
}
|
|
|
|
struct Struct2<'a, T>{
|
|
|
|
_t: &'a T,
|
|
|
|
}
|
|
|
|
struct Struct3<T>{
|
|
|
|
_t: T,
|
|
|
|
}
|
|
|
|
|
2020-06-16 19:24:16 -05:00
|
|
|
struct X<T>(T);
|
|
|
|
|
|
|
|
struct Struct4<T>{
|
|
|
|
_t: X<T>,
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Struct5<T: ?Sized>{
|
|
|
|
_t: X<T>, //~ ERROR E0277
|
|
|
|
}
|
|
|
|
|
2020-06-11 19:41:16 -05:00
|
|
|
fn main() {}
|