error[E0080]: evaluation of constant value failed
  --> $DIR/ub-incorrect-vtable.rs:19:14
   |
LL |     unsafe { std::mem::transmute((&92u8, &[0usize, 1usize, 1000usize])) };
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid vtable: alignment `1000` is not a power of 2

error[E0080]: evaluation of constant value failed
  --> $DIR/ub-incorrect-vtable.rs:24:14
   |
LL |     unsafe { std::mem::transmute((&92u8, &[1usize, usize::MAX, 1usize])) };
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid vtable: size is bigger than largest supported object

error[E0080]: it is undefined behavior to use this value
  --> $DIR/ub-incorrect-vtable.rs:34:1
   |
LL | / const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
LL | |     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), 1usize, 1000usize))) };
   | |_____________________________________________________________________________________________^ type validation failed at .0: encountered invalid vtable: alignment `1000` is not a power of 2
   |
   = 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: 8, align: 4) {
               ╾─allocN─╼ ╾─allocN─╼                         │ ╾──╼╾──╼
           }

error[E0080]: it is undefined behavior to use this value
  --> $DIR/ub-incorrect-vtable.rs:39:1
   |
LL | / const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
LL | |     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), usize::MAX, 1usize))) };
   | |______________________________________________________________________________________________^ type validation failed at .0: encountered invalid vtable: size is bigger than largest supported object
   |
   = 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: 8, align: 4) {
               ╾─allocN─╼ ╾─allocN─╼                         │ ╾──╼╾──╼
           }

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0080`.
