| 1 |
error[E0308]: mismatched types |
| 2 |
--> $DIR/try_transmute_ref.rs:19:33 |
| 3 |
| |
| 4 |
19 | let _: Result<&mut u8, _> = try_transmute_ref!(&0u8); |
| 5 |
| ^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability |
| 6 |
| |
| 7 |
= note: expected mutable reference `&mut u8` |
| 8 |
found reference `&_` |
| 9 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 10 |
|
| 11 |
error[E0308]: mismatched types |
| 12 |
--> $DIR/try_transmute_ref.rs:19:33 |
| 13 |
| |
| 14 |
19 | let _: Result<&mut u8, _> = try_transmute_ref!(&0u8); |
| 15 |
| ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 16 |
| | |
| 17 |
| types differ in mutability |
| 18 |
| help: try using a variant of the expected enum: `Err(t.try_transmute_ref())` |
| 19 |
| |
| 20 |
= note: expected enum `Result<&mut u8, _>` |
| 21 |
found enum `Result<&_, ValidityError<&u8, _>>` |
| 22 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 23 |
|
| 24 |
error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied |
| 25 |
--> $DIR/try_transmute_ref.rs:25:59 |
| 26 |
| |
| 27 |
25 | let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0)); |
| 28 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFromBytes` is not implemented for `NotZerocopy` |
| 29 |
| |
| 30 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 31 |
|
| 32 |
error[E0277]: the trait bound `NotZerocopy: Immutable` is not satisfied |
| 33 |
--> $DIR/try_transmute_ref.rs:25:59 |
| 34 |
| |
| 35 |
25 | let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0)); |
| 36 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Immutable` is not implemented for `NotZerocopy` |
| 37 |
| |
| 38 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 39 |
|
| 40 |
error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied |
| 41 |
--> $DIR/try_transmute_ref.rs:25:33 |
| 42 |
| |
| 43 |
25 | let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0)); |
| 44 |
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFromBytes` is not implemented for `NotZerocopy` |
| 45 |
| |
| 46 |
note: required by a bound in `ValidityError` |
| 47 |
--> $WORKSPACE/src/error.rs:590:45 |
| 48 |
| |
| 49 |
590 | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> { |
| 50 |
| ^^^^^^^^^^^^ required by this bound in `ValidityError` |
| 51 |
|
| 52 |
error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied |
| 53 |
--> $DIR/try_transmute_ref.rs:25:59 |
| 54 |
| |
| 55 |
25 | let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0)); |
| 56 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFromBytes` is not implemented for `NotZerocopy` |
| 57 |
| |
| 58 |
note: required by a bound in `ValidityError` |
| 59 |
--> $WORKSPACE/src/error.rs:590:45 |
| 60 |
| |
| 61 |
590 | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> { |
| 62 |
| ^^^^^^^^^^^^ required by this bound in `ValidityError` |
| 63 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 64 |
|
| 65 |
error[E0277]: the trait bound `NotZerocopy<AU16>: IntoBytes` is not satisfied |
| 66 |
--> $DIR/try_transmute_ref.rs:33:48 |
| 67 |
| |
| 68 |
33 | let src_not_into_bytes: Result<&AU16, _> = try_transmute_ref!(&NotZerocopy(AU16(0))); |
| 69 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `NotZerocopy<AU16>` |
| 70 |
| |
| 71 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 72 |
|
| 73 |
error[E0277]: the trait bound `NotZerocopy<AU16>: Immutable` is not satisfied |
| 74 |
--> $DIR/try_transmute_ref.rs:33:48 |
| 75 |
| |
| 76 |
33 | let src_not_into_bytes: Result<&AU16, _> = try_transmute_ref!(&NotZerocopy(AU16(0))); |
| 77 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Immutable` is not implemented for `NotZerocopy<AU16>` |
| 78 |
| |
| 79 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 80 |
|
| 81 |
error: aborting due to 8 previous errors |
| 82 |
|
| 83 |
Some errors have detailed explanations: E0277, E0308. |
| 84 |
For more information about an error, try `rustc --explain E0277`. |