]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/field-types.rs
Rollup merge of #88375 - joshlf:patch-3, r=dtolnay
[rust.git] / src / test / ui / type-alias-impl-trait / field-types.rs
1 #![feature(type_alias_impl_trait)]
2 #![allow(dead_code)]
3
4 // FIXME This should compile, but it currently doesn't
5
6 use std::fmt::Debug;
7
8 type Foo = impl Debug;
9 //~^ ERROR: could not find defining uses
10
11 struct Bar {
12     foo: Foo,
13 }
14
15 fn bar() -> Bar {
16     Bar { foo: "foo" }
17     //~^ ERROR: mismatched types [E0308]
18 }
19
20 fn main() {}