Sha256: 41ababb65f8bccee041dbb3edf43896a1473fc106c14ca02ccc553452c8658eb

Contents?: true

Size: 1.51 KB

Versions: 8

Compression:

Stored size: 1.51 KB

Contents

warning: taking a mutable reference to a `const` item
  --> tests/ui-stable/transmute-mut-const.rs:20:52
   |
20 | const CONST_CONTEXT: &mut [u8; 2] = transmute_mut!(&mut ARRAY_OF_U8S);
   |                                                    ^^^^^^^^^^^^^^^^^
   |
   = note: each usage of a `const` item creates a new temporary
   = note: the mutable reference will refer to this temporary, not the original `const` item
note: `const` item defined here
  --> tests/ui-stable/transmute-mut-const.rs:17:1
   |
17 | const ARRAY_OF_U8S: [u8; 2] = [0u8; 2];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `#[warn(const_item_mutation)]` on by default

error[E0658]: mutable references are not allowed in constants
  --> tests/ui-stable/transmute-mut-const.rs:20:52
   |
20 | const CONST_CONTEXT: &mut [u8; 2] = transmute_mut!(&mut ARRAY_OF_U8S);
   |                                                    ^^^^^^^^^^^^^^^^^
   |
   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information

error[E0015]: cannot call non-const fn `transmute_mut::<'_, '_, [u8; 2], [u8; 2]>` in constants
  --> tests/ui-stable/transmute-mut-const.rs:20:37
   |
20 | const CONST_CONTEXT: &mut [u8; 2] = transmute_mut!(&mut ARRAY_OF_U8S);
   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/zerocopy-0.7.35/tests/ui-stable/transmute-mut-const.stderr
wasmtime-28.0.0 ./ext/cargo-vendor/zerocopy-0.7.35/tests/ui-stable/transmute-mut-const.stderr
wasmtime-27.0.0 ./ext/cargo-vendor/zerocopy-0.7.35/tests/ui-stable/transmute-mut-const.stderr
wasmtime-26.0.0 ./ext/cargo-vendor/zerocopy-0.7.35/tests/ui-stable/transmute-mut-const.stderr
wasmtime-25.0.2 ./ext/cargo-vendor/zerocopy-0.7.35/tests/ui-stable/transmute-mut-const.stderr
wasmtime-25.0.1 ./ext/cargo-vendor/zerocopy-0.7.35/tests/ui-stable/transmute-mut-const.stderr
wasmtime-25.0.0 ./ext/cargo-vendor/zerocopy-0.7.35/tests/ui-stable/transmute-mut-const.stderr
wasmtime-24.0.0 ./ext/cargo-vendor/zerocopy-0.7.35/tests/ui-stable/transmute-mut-const.stderr