blob: 46621362e4f73a2bc56837348fa7cf133a639fd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Issue 52985: user code provides no use case that allows a type alias `impl Trait`
// We now emit a 'unconstrained opaque type' error
#![feature(type_alias_impl_trait)]
mod foo {
pub type Foo = impl Copy;
//~^ ERROR unconstrained opaque type
// make compiler happy about using 'Foo'
pub fn bar(x: Foo) -> Foo {
x
}
}
fn main() {
let _: foo::Foo = std::mem::transmute(0u8);
//~^ ERROR cannot transmute between types of different sizes, or dependently-sized types
}
|