]>
Commit | Line | Data |
---|---|---|
72b1a166 FG |
1 | #![feature(unsize, dispatch_from_dyn)] |
2 | ||
3 | use std::marker::Unsize; | |
4 | use std::ops::DispatchFromDyn; | |
5 | ||
6 | #[allow(unused)] | |
7 | struct Foo<'a, T: ?Sized> { | |
8 | _inner: &'a &'a T, | |
9 | } | |
10 | ||
11 | impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Foo<'a, U>> for Foo<'a, T> {} | |
12 | //~^ ERROR the trait bound `&'a T: Unsize<&'a U>` is not satisfied | |
13 | //~| NOTE the trait `Unsize<&'a U>` is not implemented for `&'a T` | |
14 | //~| NOTE all implementations of `Unsize` are provided automatically by the compiler | |
15 | //~| NOTE required because of the requirements on the impl | |
16 | ||
17 | fn main() {} |