]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / type-alias-impl-trait / no_inferrable_concrete_type.rs
CommitLineData
416331ca
XL
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
6a06907d
XL
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
416331ca
XL
9
10type Foo = impl Copy; //~ could not find defining uses
11
12// make compiler happy about using 'Foo'
13fn bar(x: Foo) -> Foo { x }
14
15fn main() {
6a06907d 16 let _: Foo = std::mem::transmute(0u8); //[min_tait]~ ERROR not permitted here
416331ca 17}