]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/associated-impl-trait-type.rs
Auto merge of #106742 - compiler-errors:new-solver-make-it-not-ice, r=lcnr
[rust.git] / tests / ui / impl-trait / associated-impl-trait-type.rs
1 #![feature(type_alias_impl_trait)]
2 // build-pass (FIXME(62277): could be check-pass?)
3
4 trait Bar {}
5 struct Dummy;
6 impl Bar for Dummy {}
7
8 trait Foo {
9     type Assoc: Bar;
10     fn foo() -> Self::Assoc;
11     fn bar() -> Self::Assoc;
12 }
13
14 impl Foo for i32 {
15     type Assoc = impl Bar;
16     fn foo() -> Self::Assoc {
17         Dummy
18     }
19     fn bar() -> Self::Assoc {
20         Dummy
21     }
22 }
23
24 fn main() {}