]>
Commit | Line | Data |
---|---|---|
29967ef6 | 1 | // ignore-compare-mode-chalk |
ee023bcb | 2 | // check-pass |
94222f64 | 3 | #![feature(type_alias_impl_trait)] |
60c5eb7d XL |
4 | use std::fmt::Debug; |
5 | ||
6a06907d | 6 | type Foo = impl Debug; |
416331ca | 7 | |
6a06907d XL |
8 | struct Bar(Foo); |
9 | fn define() -> Bar { | |
ee023bcb | 10 | Bar(42) |
416331ca XL |
11 | } |
12 | ||
6a06907d | 13 | type Foo2 = impl Debug; |
416331ca | 14 | |
6a06907d | 15 | fn define2() { |
94222f64 | 16 | let x = || -> Foo2 { 42 }; |
60c5eb7d XL |
17 | } |
18 | ||
6a06907d | 19 | type Foo3 = impl Debug; |
f035d41b | 20 | |
6a06907d | 21 | fn define3(x: Foo3) { |
ee023bcb | 22 | let y: i32 = x; |
f035d41b | 23 | } |
6a06907d | 24 | fn define3_1() { |
ee023bcb | 25 | define3(42) |
6a06907d XL |
26 | } |
27 | ||
28 | type Foo4 = impl Debug; | |
60c5eb7d | 29 | |
6a06907d XL |
30 | fn define4() { |
31 | let y: Foo4 = 42; | |
60c5eb7d XL |
32 | } |
33 | ||
416331ca | 34 | fn main() {} |