mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
14 lines
228 B
Rust
14 lines
228 B
Rust
#![feature(coerce_unsized)]
|
|
use std::ops::CoerceUnsized;
|
|
|
|
struct Foo<T: ?Sized, U: ?Sized> {
|
|
a: i32,
|
|
b: T, //~ ERROR E0277
|
|
c: U,
|
|
}
|
|
|
|
impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {}
|
|
//~^ ERROR E0375
|
|
|
|
fn main() {}
|