blob: 689f7a733cb5e935b3b4a91ceaa63968457a7ffc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
error: item does not constrain `Bug::{opaque#0}`
--> $DIR/issue-53092-2.rs:7:7
|
LL | const CONST_BUG: Bug<u8, ()> = 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<T, U> = 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<u8, ()> = 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`.
|