rust/tests/ui/traits/issue-71036.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
513 B
Rust
Raw Normal View History

2020-05-14 10:37:58 +00:00
#![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`
2020-05-14 10:37:58 +00:00
//~| NOTE all implementations of `Unsize` are provided automatically by the compiler
//~| NOTE required for
2020-05-14 10:37:58 +00:00
fn main() {}