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