]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs
Allow combining -Cprofile-generate and -Cpanic=unwind when targeting
[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 // revisions: min_tait full_tait
5 #![feature(min_type_alias_impl_trait)]
6 #![cfg_attr(full_tait, feature(type_alias_impl_trait, impl_trait_in_bindings))]
7 //[full_tait]~^ WARN incomplete
8 //[full_tait]~| WARN incomplete
9
10 type Foo = impl Copy; //~ could not find defining uses
11
12 // make compiler happy about using 'Foo'
13 fn bar(x: Foo) -> Foo { x }
14
15 fn main() {
16     let _: Foo = std::mem::transmute(0u8); //[min_tait]~ ERROR not permitted here
17 }