]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs
parser will not give wrong help message for 'public'
[rust.git] / src / test / ui / feature-gates / feature-gate-type_alias_impl_trait.rs
1 // ignore-compare-mode-chalk
2 // check-pass
3 #![feature(type_alias_impl_trait)]
4 use std::fmt::Debug;
5
6 type Foo = impl Debug;
7
8 struct Bar(Foo);
9 fn define() -> Bar {
10     Bar(42)
11 }
12
13 type Foo2 = impl Debug;
14
15 fn define2() {
16     let x = || -> Foo2 { 42 };
17 }
18
19 type Foo3 = impl Debug;
20
21 fn define3(x: Foo3) {
22     let y: i32 = x;
23 }
24 fn define3_1() {
25     define3(42)
26 }
27
28 type Foo4 = impl Debug;
29
30 fn define4() {
31     let y: Foo4 = 42;
32 }
33
34 fn main() {}