]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_gcc-2022-03-26
[rust.git] / src / test / ui / type-alias-impl-trait / no_inferrable_concrete_type.rs
1 // Issue 52985: user code provides no use case that allows a type alias `impl Trait`
2 // We now emit a 'could not find defining uses' error
3
4 #![feature(type_alias_impl_trait)]
5
6 type Foo = impl Copy; //~ could not find defining uses
7
8 // make compiler happy about using 'Foo'
9 fn bar(x: Foo) -> Foo {
10     x
11 }
12
13 fn main() {
14     let _: Foo = std::mem::transmute(0u8);
15 }