]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister
[rust.git] / src / test / ui / type-alias-impl-trait / issue-76202-trait-impl-for-tait.rs
1 // Regression test for issue #76202
2 // Tests that we don't ICE when we have a trait impl on a TAIT.
3
4 // revisions: min_tait full_tait
5 #![feature(min_type_alias_impl_trait)]
6 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
7 //[full_tait]~^ WARN incomplete
8
9 trait Dummy {}
10 impl Dummy for () {}
11
12 type F = impl Dummy;
13 fn f() -> F {}
14
15 trait Test {
16     fn test(self);
17 }
18
19 impl Test for F { //~ ERROR cannot implement trait
20     fn test(self) {}
21 }
22
23 fn main() {
24     let x: F = f();
25     x.test();
26 }