Closed
Description
Given the following code:
#![feature(type_alias_impl_trait)]
#![allow(dead_code)]
type Bug<T, U> = impl Fn(T) -> U + Copy; //~ ERROR cycle detected
const CONST_BUG: Bug<u8, ()> = unsafe { std::mem::transmute(|_: u8| ()) };
//~^ ERROR: cannot transmute
fn main() {}
The current output is:
....
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> ./src/test/ui/type-alias-impl-trait/issue-53092-2.rs:6:41
|
6 | const CONST_BUG: Bug<u8, ()> = unsafe { std::mem::transmute(|_: u8| ()) };
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: `[closure@./src/test/ui/type-alias-impl-trait/issue-53092-2.rs:6:61: 6:68]` (0 bits)
= note: target type: `Bug<u8, ()>` (size can vary because of [type error])
error: aborting due to 2 previous errors