blob: 42f07d49ffe25355e713f06e17f7dc3c600f2854 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#![feature(type_alias_impl_trait)]
// build-pass (FIXME(62277): could be check-pass?)
trait Bar {}
struct Dummy;
impl Bar for Dummy {}
trait Foo {
type Assoc: Bar;
fn foo() -> Self::Assoc;
fn bar() -> Self::Assoc;
}
type Helper = impl Bar;
impl Foo for i32 {
type Assoc = Helper;
fn foo() -> Helper {
Dummy
}
fn bar() -> Helper {
Dummy
}
}
fn main() {}
|