]>
Commit | Line | Data |
---|---|---|
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 | |
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() { | |
6a06907d | 16 | let _: Foo = std::mem::transmute(0u8); //[min_tait]~ ERROR not permitted here |
416331ca | 17 | } |