]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/issue-71036.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / 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() {}