2016-08-06 14:44:49 -05:00
|
|
|
#![feature(coerce_unsized)]
|
|
|
|
use std::ops::CoerceUnsized;
|
|
|
|
|
|
|
|
struct Foo<T: ?Sized, U: ?Sized> {
|
|
|
|
a: i32,
|
2024-02-02 02:36:46 -06:00
|
|
|
b: T, //~ ERROR E0277
|
2016-08-06 14:44:49 -05:00
|
|
|
c: U,
|
|
|
|
}
|
|
|
|
|
2016-08-15 12:37:03 -05:00
|
|
|
impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {}
|
|
|
|
//~^ ERROR E0375
|
2016-08-06 14:44:49 -05:00
|
|
|
|
|
|
|
fn main() {}
|