70 lines
4.1 KiB
Plaintext
70 lines
4.1 KiB
Plaintext
error[E0080]: it is undefined behavior to use this value
|
|
--> $DIR/ub-incorrect-vtable.rs:18:1
|
|
|
|
|
LL | const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1<imm>, but expected a vtable pointer
|
|
|
|
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
|
= note: the raw bytes of the constant (size: 16, align: 8) {
|
|
╾ALLOC0<imm>╼ ╾ALLOC1<imm>╼ │ ╾──────╼╾──────╼
|
|
}
|
|
|
|
error[E0080]: it is undefined behavior to use this value
|
|
--> $DIR/ub-incorrect-vtable.rs:23:1
|
|
|
|
|
LL | const INVALID_VTABLE_SIZE: &dyn Trait =
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, but expected a vtable pointer
|
|
|
|
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
|
= note: the raw bytes of the constant (size: 16, align: 8) {
|
|
╾ALLOC2<imm>╼ ╾ALLOC3<imm>╼ │ ╾──────╼╾──────╼
|
|
}
|
|
|
|
error[E0080]: it is undefined behavior to use this value
|
|
--> $DIR/ub-incorrect-vtable.rs:33:1
|
|
|
|
|
LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5<imm>, but expected a vtable pointer
|
|
|
|
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
|
= note: the raw bytes of the constant (size: 16, align: 8) {
|
|
╾ALLOC4<imm>╼ ╾ALLOC5<imm>╼ │ ╾──────╼╾──────╼
|
|
}
|
|
|
|
error[E0080]: it is undefined behavior to use this value
|
|
--> $DIR/ub-incorrect-vtable.rs:38:1
|
|
|
|
|
LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7<imm>, but expected a vtable pointer
|
|
|
|
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
|
= note: the raw bytes of the constant (size: 16, align: 8) {
|
|
╾ALLOC6<imm>╼ ╾ALLOC7<imm>╼ │ ╾──────╼╾──────╼
|
|
}
|
|
|
|
error[E0080]: it is undefined behavior to use this value
|
|
--> $DIR/ub-incorrect-vtable.rs:44:1
|
|
|
|
|
LL | const INVALID_VTABLE_UB: W<&dyn Trait> =
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9<imm>, but expected a vtable pointer
|
|
|
|
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
|
= note: the raw bytes of the constant (size: 16, align: 8) {
|
|
╾ALLOC8<imm>╼ ╾ALLOC9<imm>╼ │ ╾──────╼╾──────╼
|
|
}
|
|
|
|
error[E0080]: it is undefined behavior to use this value
|
|
--> $DIR/ub-incorrect-vtable.rs:91:1
|
|
|
|
|
LL | const G: Wide = unsafe { Transmute { t: FOO }.u };
|
|
| ^^^^^^^^^^^^^ constructing invalid value at .1: encountered a dangling reference (going beyond the bounds of its allocation)
|
|
|
|
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
|
= note: the raw bytes of the constant (size: 16, align: 8) {
|
|
╾ALLOC10<imm>╼ ╾ALLOC11╼ │ ╾──────╼╾──────╼
|
|
}
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0080`.
|