summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/issue-71036.rs
blob: 3d2df6fe997a7514d6feed5f83d251680fa08c38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(unsize, dispatch_from_dyn)]

use std::marker::Unsize;
use std::ops::DispatchFromDyn;

#[allow(unused)]
struct Foo<'a, T: ?Sized> {
    _inner: &'a &'a T,
}

impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Foo<'a, U>> for Foo<'a, T> {}
//~^ ERROR the trait bound `&'a T: Unsize<&'a U>` is not satisfied
//~| NOTE the trait `Unsize<&'a U>` is not implemented for `&'a T`
//~| NOTE all implementations of `Unsize` are provided automatically by the compiler
//~| NOTE required because of the requirements on the impl

fn main() {}