]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/issue-78372.rs
Perform coherence checking per impl.
[rust.git] / src / test / ui / traits / issue-78372.rs
1 use std::ops::DispatchFromDyn; //~ ERROR use of unstable library feature 'dispatch_from_dyn'
2 struct Smaht<T, MISC>(PhantomData); //~ ERROR cannot find type `PhantomData` in this scope
3 impl<T> DispatchFromDyn<Smaht<U, MISC>> for T {} //~ ERROR cannot find type `U` in this scope
4 //~^ ERROR cannot find type `MISC` in this scope
5 //~| ERROR use of unstable library feature 'dispatch_from_dyn'
6 //~| ERROR the trait `DispatchFromDyn` may only be implemented for a coercion between structures
7 trait Foo: X<u32> {}
8 trait X<T> {
9     fn foo(self: Smaht<Self, T>);
10 }
11 trait Marker {}
12 impl Marker for dyn Foo {}
13 fn main() {}