]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/issue-78372.rs
Auto merge of #87284 - Aaron1011:remove-paren-special, r=petrochenkov
[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 //~| ERROR type parameter `T` must be covered by another type when it appears before the first
8 trait Foo: X<u32> {}
9 trait X<T> {
10     fn foo(self: Smaht<Self, T>);
11 }
12 trait Marker {}
13 impl Marker for dyn Foo {}
14 fn main() {}