error: item does not constrain `Bug::{opaque#0}` --> $DIR/issue-53092-2.rs:7:7 | LL | const CONST_BUG: Bug = unsafe { std::mem::transmute(|_: u8| ()) }; | ^^^^^^^^^ | = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]` note: this opaque type is supposed to be constrained --> $DIR/issue-53092-2.rs:4:18 | LL | type Bug = impl Fn(T) -> U + Copy; | ^^^^^^^^^^^^^^^^^^^^^^ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/issue-53092-2.rs:7:41 | LL | const CONST_BUG: Bug = unsafe { std::mem::transmute(|_: u8| ()) }; | ^^^^^^^^^^^^^^^^^^^ | = note: source type: `{closure@$DIR/issue-53092-2.rs:7:61: 7:68}` (0 bits) = note: target type: `{type error}` (the type has an unknown layout) error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0512`.