]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-67844-nested-opaque.rs
CommitLineData
74b04a01
XL
1// check-pass
2// Regression test for issue #67844
3// Ensures that we properly handle nested TAIT occurrences
4// with generic parameters
5
6a06907d
XL
6// revisions: min_tait full_tait
7#![feature(min_type_alias_impl_trait)]
8#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
9//[full_tait]~^ WARN incomplete
74b04a01
XL
10
11trait WithAssoc { type AssocType; }
12
13trait WithParam<A> {}
14
15type Return<A> = impl WithAssoc<AssocType = impl WithParam<A>>;
16
17struct MyParam;
18impl<A> WithParam<A> for MyParam {}
19
20struct MyStruct;
21
22impl WithAssoc for MyStruct {
23 type AssocType = MyParam;
24}
25
26
27fn my_fun<A>() -> Return<A> {
28 MyStruct
29}
30
31fn my_other_fn<A>() -> impl WithAssoc<AssocType = impl WithParam<A>> {
32 MyStruct
33}
34
35fn main() {}