112 lines
5.4 KiB
Plaintext
112 lines
5.4 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/transmute_mut.rs:17:36
|
|
|
|
|
17 | const DST_NOT_A_REFERENCE: usize = transmute_mut!(&mut 0u8);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&mut _`
|
|
|
|
|
= note: expected type `usize`
|
|
found mutable reference `&mut _`
|
|
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/transmute_mut.rs:17:36
|
|
|
|
|
17 | const DST_NOT_A_REFERENCE: usize = transmute_mut!(&mut 0u8);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&mut _`
|
|
|
|
|
= note: expected type `usize`
|
|
found mutable reference `&mut _`
|
|
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `DstA: FromBytes` is not satisfied
|
|
--> $DIR/transmute_mut.rs:30:39
|
|
|
|
|
30 | const DST_NOT_FROM_BYTES: &mut DstA = transmute_mut!(&mut SrcA);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `DstA`
|
|
|
|
|
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `DstB: IntoBytes` is not satisfied
|
|
--> $DIR/transmute_mut.rs:42:37
|
|
|
|
|
42 | const DST_NOT_AS_BYTES: &mut DstB = transmute_mut!(&mut SrcB);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `DstB`
|
|
|
|
|
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/transmute_mut.rs:47:59
|
|
|
|
|
47 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(0usize);
|
|
| ---------------^^^^^^-
|
|
| | |
|
|
| | expected `&mut _`, found `usize`
|
|
| | help: consider mutably borrowing here: `&mut 0usize`
|
|
| expected due to this
|
|
|
|
|
= note: expected mutable reference `&mut _`
|
|
found type `usize`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/transmute_mut.rs:58:53
|
|
|
|
|
58 | const SRC_NOT_A_REFERENCE: &mut u8 = transmute_mut!(0usize);
|
|
| ---------------^^^^^^-
|
|
| | |
|
|
| | expected `&mut _`, found `usize`
|
|
| | help: consider mutably borrowing here: `&mut 0usize`
|
|
| expected due to this
|
|
|
|
|
= note: expected mutable reference `&mut _`
|
|
found type `usize`
|
|
|
|
error[E0277]: the trait bound `SrcC: FromBytes` is not satisfied
|
|
--> $DIR/transmute_mut.rs:70:39
|
|
|
|
|
70 | const SRC_NOT_FROM_BYTES: &mut DstC = transmute_mut!(&mut SrcC);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `SrcC`
|
|
|
|
|
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `SrcD: IntoBytes` is not satisfied
|
|
--> $DIR/transmute_mut.rs:82:37
|
|
|
|
|
82 | const SRC_NOT_AS_BYTES: &mut DstD = transmute_mut!(&mut SrcD);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `SrcD`
|
|
|
|
|
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0599]: the method `transmute_mut` exists for struct `Wrap<&mut [u8], &mut [u8; 1]>`, but its trait bounds were not satisfied
|
|
--> $DIR/transmute_mut.rs:87:35
|
|
|
|
|
87 | const SRC_UNSIZED: &mut [u8; 1] = transmute_mut!(&mut [0u8][..]);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `Wrap<&mut [u8], &mut [u8; 1]>` due to unsatisfied trait bounds
|
|
|
|
|
::: $WORKSPACE/src/util/macro_util.rs:692:1
|
|
|
|
|
692 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
|
|
| --------------------------------------------------------- doesn't satisfy `Wrap<&mut [u8], &mut [u8; 1]>: TransmuteMutDst`
|
|
|
|
|
= note: the following trait bounds were not satisfied:
|
|
`[u8]: Sized`
|
|
`<[u8; 1] as KnownLayout>::PointerMetadata = usize`
|
|
which is required by `Wrap<&mut [u8], &mut [u8; 1]>: TransmuteMutDst`
|
|
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/transmute_mut.rs:52:37
|
|
|
|
|
52 | let _: &mut u8 = transmute_mut!(&0u8);
|
|
| ---------------^^^^-
|
|
| | |
|
|
| | types differ in mutability
|
|
| expected due to this
|
|
|
|
|
= note: expected mutable reference `&mut _`
|
|
found reference `&u8`
|
|
|
|
error: aborting due to 10 previous errors
|
|
|
|
Some errors have detailed explanations: E0277, E0308, E0599.
|
|
For more information about an error, try `rustc --explain E0277`.
|