| 1 |
error[E0308]: mismatched types |
| 2 |
--> tests$RUSTUP_TOOLCHAIN/lib/rustlib/src/rust/library/core/src/result.rs:561:5 |
| 3 |
| |
| 4 |
561 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), |
| 5 |
| ^^ |
| 6 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 7 |
|
| 8 |
error[E0308]: mismatched types |
| 9 |
--> $DIR/try_transmute_ref.rs:19:33 |
| 10 |
| |
| 11 |
19 | let _: Result<&mut u8, _> = try_transmute_ref!(&0u8); |
| 12 |
| ^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability |
| 13 |
| |
| 14 |
= note: expected enum `Result<&mut u8, _>` |
| 15 |
found enum `Result<&_, ValidityError<&u8, _>>` |
| 16 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 17 |
|
| 18 |
error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied |
| 19 |
--> $DIR/try_transmute_ref.rs:25:59 |
| 20 |
| |
| 21 |
25 | let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0)); |
| 22 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound |
| 23 |
| |
| 24 |
help: the trait `TryFromBytes` is not implemented for `NotZerocopy` |
| 25 |
--> $DIR/../include.rs:15:5 |
| 26 |
| |
| 27 |
15 | pub struct NotZerocopy<T = ()>(pub T); |
| 28 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 29 |
= note: Consider adding `#[derive(TryFromBytes)]` to `NotZerocopy` |
| 30 |
= help: the following other types implement trait `TryFromBytes`: |
| 31 |
() |
| 32 |
(A, B) |
| 33 |
(A, B, C) |
| 34 |
(A, B, C, D) |
| 35 |
(A, B, C, D, E) |
| 36 |
(A, B, C, D, E, F) |
| 37 |
(A, B, C, D, E, F, G) |
| 38 |
(A, B, C, D, E, F, G, H) |
| 39 |
and 153 others |
| 40 |
note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` |
| 41 |
--> $WORKSPACE/src/util/macro_util.rs:757:14 |
| 42 |
| |
| 43 |
754 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> |
| 44 |
| ----------------- required by a bound in this associated function |
| 45 |
... |
| 46 |
757 | Dst: TryFromBytes + Immutable, |
| 47 |
| ^^^^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` |
| 48 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 49 |
= note: consider using `--verbose` to print the full type name to the console |
| 50 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 51 |
|
| 52 |
error[E0277]: the trait bound `NotZerocopy: Immutable` 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 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound |
| 57 |
| |
| 58 |
help: the trait `Immutable` is not implemented for `NotZerocopy` |
| 59 |
--> $DIR/../include.rs:15:5 |
| 60 |
| |
| 61 |
15 | pub struct NotZerocopy<T = ()>(pub T); |
| 62 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 63 |
= note: Consider adding `#[derive(Immutable)]` to `NotZerocopy` |
| 64 |
= help: the following other types implement trait `Immutable`: |
| 65 |
&T |
| 66 |
&mut T |
| 67 |
() |
| 68 |
(A, B) |
| 69 |
(A, B, C) |
| 70 |
(A, B, C, D) |
| 71 |
(A, B, C, D, E) |
| 72 |
(A, B, C, D, E, F) |
| 73 |
and 128 others |
| 74 |
note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` |
| 75 |
--> $WORKSPACE/src/util/macro_util.rs:757:29 |
| 76 |
| |
| 77 |
754 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> |
| 78 |
| ----------------- required by a bound in this associated function |
| 79 |
... |
| 80 |
757 | Dst: TryFromBytes + Immutable, |
| 81 |
| ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` |
| 82 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 83 |
= note: consider using `--verbose` to print the full type name to the console |
| 84 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 85 |
|
| 86 |
error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied |
| 87 |
--> $DIR/try_transmute_ref.rs:25:33 |
| 88 |
| |
| 89 |
25 | let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0)); |
| 90 |
| ^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound |
| 91 |
| |
| 92 |
help: the trait `TryFromBytes` is not implemented for `NotZerocopy` |
| 93 |
--> $DIR/../include.rs:15:5 |
| 94 |
| |
| 95 |
15 | pub struct NotZerocopy<T = ()>(pub T); |
| 96 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 97 |
= note: Consider adding `#[derive(TryFromBytes)]` to `NotZerocopy` |
| 98 |
= help: the following other types implement trait `TryFromBytes`: |
| 99 |
() |
| 100 |
(A, B) |
| 101 |
(A, B, C) |
| 102 |
(A, B, C, D) |
| 103 |
(A, B, C, D, E) |
| 104 |
(A, B, C, D, E, F) |
| 105 |
(A, B, C, D, E, F, G) |
| 106 |
(A, B, C, D, E, F, G, H) |
| 107 |
and 153 others |
| 108 |
note: required by a bound in `ValidityError` |
| 109 |
--> $WORKSPACE/src/error.rs:590:45 |
| 110 |
| |
| 111 |
590 | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> { |
| 112 |
| ^^^^^^^^^^^^ required by this bound in `ValidityError` |
| 113 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 114 |
= note: consider using `--verbose` to print the full type name to the console |
| 115 |
|
| 116 |
error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied |
| 117 |
--> $DIR/try_transmute_ref.rs:25:59 |
| 118 |
| |
| 119 |
25 | let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0)); |
| 120 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound |
| 121 |
| |
| 122 |
help: the trait `TryFromBytes` is not implemented for `NotZerocopy` |
| 123 |
--> $DIR/../include.rs:15:5 |
| 124 |
| |
| 125 |
15 | pub struct NotZerocopy<T = ()>(pub T); |
| 126 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 127 |
= note: Consider adding `#[derive(TryFromBytes)]` to `NotZerocopy` |
| 128 |
= help: the following other types implement trait `TryFromBytes`: |
| 129 |
() |
| 130 |
(A, B) |
| 131 |
(A, B, C) |
| 132 |
(A, B, C, D) |
| 133 |
(A, B, C, D, E) |
| 134 |
(A, B, C, D, E, F) |
| 135 |
(A, B, C, D, E, F, G) |
| 136 |
(A, B, C, D, E, F, G, H) |
| 137 |
and 153 others |
| 138 |
note: required by a bound in `ValidityError` |
| 139 |
--> $WORKSPACE/src/error.rs:590:45 |
| 140 |
| |
| 141 |
590 | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> { |
| 142 |
| ^^^^^^^^^^^^ required by this bound in `ValidityError` |
| 143 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 144 |
= note: consider using `--verbose` to print the full type name to the console |
| 145 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 146 |
|
| 147 |
error[E0277]: the trait bound `NotZerocopy<AU16>: IntoBytes` is not satisfied |
| 148 |
--> $DIR/try_transmute_ref.rs:33:48 |
| 149 |
| |
| 150 |
33 | let src_not_into_bytes: Result<&AU16, _> = try_transmute_ref!(&NotZerocopy(AU16(0))); |
| 151 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound |
| 152 |
| |
| 153 |
help: the trait `IntoBytes` is not implemented for `NotZerocopy<AU16>` |
| 154 |
--> $DIR/../include.rs:15:5 |
| 155 |
| |
| 156 |
15 | pub struct NotZerocopy<T = ()>(pub T); |
| 157 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 158 |
= note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy<AU16>` |
| 159 |
= help: the following other types implement trait `IntoBytes`: |
| 160 |
() |
| 161 |
AU16 |
| 162 |
AtomicBool |
| 163 |
AtomicI16 |
| 164 |
AtomicI32 |
| 165 |
AtomicI64 |
| 166 |
AtomicI8 |
| 167 |
AtomicIsize |
| 168 |
and 68 others |
| 169 |
note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` |
| 170 |
--> $WORKSPACE/src/util/macro_util.rs:756:14 |
| 171 |
| |
| 172 |
754 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> |
| 173 |
| ----------------- required by a bound in this associated function |
| 174 |
755 | where |
| 175 |
756 | Src: IntoBytes + Immutable, |
| 176 |
| ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` |
| 177 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 178 |
|
| 179 |
error[E0277]: the trait bound `NotZerocopy<AU16>: Immutable` is not satisfied |
| 180 |
--> $DIR/try_transmute_ref.rs:33:48 |
| 181 |
| |
| 182 |
33 | let src_not_into_bytes: Result<&AU16, _> = try_transmute_ref!(&NotZerocopy(AU16(0))); |
| 183 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound |
| 184 |
| |
| 185 |
help: the trait `Immutable` is not implemented for `NotZerocopy<AU16>` |
| 186 |
--> $DIR/../include.rs:15:5 |
| 187 |
| |
| 188 |
15 | pub struct NotZerocopy<T = ()>(pub T); |
| 189 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 190 |
= note: Consider adding `#[derive(Immutable)]` to `NotZerocopy<AU16>` |
| 191 |
= help: the following other types implement trait `Immutable`: |
| 192 |
&T |
| 193 |
&mut T |
| 194 |
() |
| 195 |
(A, B) |
| 196 |
(A, B, C) |
| 197 |
(A, B, C, D) |
| 198 |
(A, B, C, D, E) |
| 199 |
(A, B, C, D, E, F) |
| 200 |
and 128 others |
| 201 |
note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` |
| 202 |
--> $WORKSPACE/src/util/macro_util.rs:756:26 |
| 203 |
| |
| 204 |
754 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> |
| 205 |
| ----------------- required by a bound in this associated function |
| 206 |
755 | where |
| 207 |
756 | Src: IntoBytes + Immutable, |
| 208 |
| ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` |
| 209 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 210 |
= note: consider using `--verbose` to print the full type name to the console |
| 211 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 212 |
|
| 213 |
error: aborting due to 8 previous errors |
| 214 |
|
| 215 |
Some errors have detailed explanations: E0277, E0308. |
| 216 |
For more information about an error, try `rustc --explain E0277`. |