mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
15 lines
287 B
Rust
15 lines
287 B
Rust
#![feature(coerce_unsized)]
|
|
use std::ops::CoerceUnsized;
|
|
|
|
pub struct Foo<T: ?Sized> {
|
|
field_with_unsized_type: T,
|
|
}
|
|
|
|
pub struct Bar<T: ?Sized> {
|
|
field_with_unsized_type: T,
|
|
}
|
|
|
|
impl<T, U> CoerceUnsized<Bar<U>> for Foo<T> where T: CoerceUnsized<U> {} //~ ERROR E0377
|
|
|
|
fn main() {}
|