]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/two_tait_defining_each_other2.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / impl-trait / two_tait_defining_each_other2.rs
1 #![feature(type_alias_impl_trait)]
2
3 type A = impl Foo; //~ ERROR unconstrained opaque type
4 type B = impl Foo;
5
6 trait Foo {}
7
8 fn muh(x: A) -> B {
9     x // B's hidden type is A (opaquely)
10     //~^ ERROR opaque type's hidden type cannot be another opaque type
11 }
12
13 struct Bar;
14 impl Foo for Bar {}
15
16 fn main() {}