]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-71036.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-71036.rs
CommitLineData
72b1a166
FG
1#![feature(unsize, dispatch_from_dyn)]
2
3use std::marker::Unsize;
4use std::ops::DispatchFromDyn;
5
6#[allow(unused)]
7struct Foo<'a, T: ?Sized> {
8 _inner: &'a &'a T,
9}
10
11impl<'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
17fn main() {}