]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/issue-71036.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / traits / issue-71036.rs
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 for
16
17 fn main() {}