| 1 |
error[E0308]: mismatched types |
| 2 |
--> $DIR/transmute_ref.rs:20:22 |
| 3 |
| |
| 4 |
20 | let _: &mut u8 = 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 `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 10 |
|
| 11 |
error[E0308]: mismatched types |
| 12 |
--> $DIR/transmute_ref.rs:20:22 |
| 13 |
| |
| 14 |
20 | let _: &mut u8 = transmute_ref!(&0u8); |
| 15 |
| ^^^^^^^^^^^^^^^^^^^^ types differ in mutability |
| 16 |
| |
| 17 |
= note: expected mutable reference `&mut u8` |
| 18 |
found reference `&_` |
| 19 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 20 |
|
| 21 |
error[E0308]: mismatched types |
| 22 |
--> $DIR/transmute_ref.rs:20:22 |
| 23 |
| |
| 24 |
20 | let _: &mut u8 = transmute_ref!(&0u8); |
| 25 |
| ^^^^^^^^^^^^^^^^^^^^ types differ in mutability |
| 26 |
| |
| 27 |
= note: expected mutable reference `&mut u8` |
| 28 |
found reference `&_` |
| 29 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 30 |
|
| 31 |
error[E0308]: mismatched types |
| 32 |
--> $DIR/transmute_ref.rs:20:22 |
| 33 |
| |
| 34 |
20 | let _: &mut u8 = transmute_ref!(&0u8); |
| 35 |
| ^^^^^^^^^^^^^^^^^^^^ types differ in mutability |
| 36 |
| |
| 37 |
= note: expected mutable reference `&mut u8` |
| 38 |
found reference `&_` |
| 39 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 40 |
|
| 41 |
error[E0308]: mismatched types |
| 42 |
--> $DIR/transmute_ref.rs:29:36 |
| 43 |
| |
| 44 |
29 | const DST_NOT_A_REFERENCE: usize = transmute_ref!(&0u8); |
| 45 |
| ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_` |
| 46 |
| |
| 47 |
= note: expected type `usize` |
| 48 |
found reference `&_` |
| 49 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 50 |
|
| 51 |
error[E0308]: mismatched types |
| 52 |
--> $DIR/transmute_ref.rs:29:36 |
| 53 |
| |
| 54 |
29 | const DST_NOT_A_REFERENCE: usize = transmute_ref!(&0u8); |
| 55 |
| ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_` |
| 56 |
| |
| 57 |
= note: expected type `usize` |
| 58 |
found reference `&_` |
| 59 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 60 |
|
| 61 |
error[E0308]: mismatched types |
| 62 |
--> $DIR/transmute_ref.rs:29:36 |
| 63 |
| |
| 64 |
29 | const DST_NOT_A_REFERENCE: usize = transmute_ref!(&0u8); |
| 65 |
| ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_` |
| 66 |
| |
| 67 |
= note: expected type `usize` |
| 68 |
found reference `&_` |
| 69 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 70 |
|
| 71 |
error[E0308]: mismatched types |
| 72 |
--> $DIR/transmute_ref.rs:29:36 |
| 73 |
| |
| 74 |
29 | const DST_NOT_A_REFERENCE: usize = transmute_ref!(&0u8); |
| 75 |
| ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_` |
| 76 |
| |
| 77 |
= note: expected type `usize` |
| 78 |
found reference `&_` |
| 79 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 80 |
|
| 81 |
error[E0277]: the trait bound `DstA: FromBytes` is not satisfied |
| 82 |
--> $DIR/transmute_ref.rs:40:35 |
| 83 |
| |
| 84 |
40 | const DST_NOT_FROM_BYTES: &DstA = transmute_ref!(&AU16(0)); |
| 85 |
| ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 86 |
| | |
| 87 |
| unsatisfied trait bound |
| 88 |
| required by a bound introduced by this call |
| 89 |
| |
| 90 |
help: the trait `FromBytes` is not implemented for `DstA` |
| 91 |
--> $DIR/transmute_ref.rs:37:1 |
| 92 |
| |
| 93 |
37 | struct DstA(AU16); |
| 94 |
| ^^^^^^^^^^^ |
| 95 |
= note: Consider adding `#[derive(FromBytes)]` to `DstA` |
| 96 |
= help: the following other types implement trait `FromBytes`: |
| 97 |
() |
| 98 |
(A, B) |
| 99 |
(A, B, C) |
| 100 |
(A, B, C, D) |
| 101 |
(A, B, C, D, E) |
| 102 |
(A, B, C, D, E, F) |
| 103 |
(A, B, C, D, E, F, G) |
| 104 |
(A, B, C, D, E, F, G, H) |
| 105 |
and 80 others |
| 106 |
note: required by a bound in `DST_NOT_FROM_BYTES::AssertDstIsFromBytes` |
| 107 |
--> $DIR/transmute_ref.rs:40:35 |
| 108 |
| |
| 109 |
40 | const DST_NOT_FROM_BYTES: &DstA = transmute_ref!(&AU16(0)); |
| 110 |
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertDstIsFromBytes` |
| 111 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 112 |
= note: consider using `--verbose` to print the full type name to the console |
| 113 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 114 |
|
| 115 |
error[E0277]: the trait bound `DstB: Immutable` is not satisfied |
| 116 |
--> $DIR/transmute_ref.rs:48:34 |
| 117 |
| |
| 118 |
48 | const DST_NOT_IMMUTABLE: &DstB = transmute_ref!(&AU16(0)); |
| 119 |
| ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 120 |
| | |
| 121 |
| unsatisfied trait bound |
| 122 |
| required by a bound introduced by this call |
| 123 |
| |
| 124 |
help: the trait `Immutable` is not implemented for `DstB` |
| 125 |
--> $DIR/transmute_ref.rs:45:1 |
| 126 |
| |
| 127 |
45 | struct DstB(AU16); |
| 128 |
| ^^^^^^^^^^^ |
| 129 |
= note: Consider adding `#[derive(Immutable)]` to `DstB` |
| 130 |
= help: the following other types implement trait `Immutable`: |
| 131 |
&T |
| 132 |
&mut T |
| 133 |
() |
| 134 |
(A, B) |
| 135 |
(A, B, C) |
| 136 |
(A, B, C, D) |
| 137 |
(A, B, C, D, E) |
| 138 |
(A, B, C, D, E, F) |
| 139 |
and 130 others |
| 140 |
note: required by a bound in `DST_NOT_IMMUTABLE::AssertDstIsImmutable` |
| 141 |
--> $DIR/transmute_ref.rs:48:34 |
| 142 |
| |
| 143 |
48 | const DST_NOT_IMMUTABLE: &DstB = transmute_ref!(&AU16(0)); |
| 144 |
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertDstIsImmutable` |
| 145 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 146 |
= note: consider using `--verbose` to print the full type name to the console |
| 147 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 148 |
|
| 149 |
error[E0308]: mismatched types |
| 150 |
--> $DIR/transmute_ref.rs:53:54 |
| 151 |
| |
| 152 |
53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); |
| 153 |
| ---------------^^^^^^- |
| 154 |
| | | |
| 155 |
| | expected `&_`, found `usize` |
| 156 |
| expected due to this |
| 157 |
| |
| 158 |
= note: expected reference `&_` |
| 159 |
found type `usize` |
| 160 |
help: consider borrowing here |
| 161 |
| |
| 162 |
53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(&0usize); |
| 163 |
| + |
| 164 |
|
| 165 |
error[E0308]: mismatched types |
| 166 |
--> $DIR/transmute_ref.rs:53:39 |
| 167 |
| |
| 168 |
53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); |
| 169 |
| ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_` |
| 170 |
| |
| 171 |
= note: expected type `usize` |
| 172 |
found reference `&_` |
| 173 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 174 |
|
| 175 |
error[E0308]: mismatched types |
| 176 |
--> $DIR/transmute_ref.rs:53:39 |
| 177 |
| |
| 178 |
53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); |
| 179 |
| ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_` |
| 180 |
| |
| 181 |
= note: expected type `usize` |
| 182 |
found reference `&_` |
| 183 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 184 |
|
| 185 |
error[E0308]: mismatched types |
| 186 |
--> $DIR/transmute_ref.rs:53:39 |
| 187 |
| |
| 188 |
53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); |
| 189 |
| ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_` |
| 190 |
| |
| 191 |
= note: expected type `usize` |
| 192 |
found reference `&_` |
| 193 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 194 |
|
| 195 |
error[E0308]: mismatched types |
| 196 |
--> $DIR/transmute_ref.rs:53:39 |
| 197 |
| |
| 198 |
53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); |
| 199 |
| ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_` |
| 200 |
| |
| 201 |
= note: expected type `usize` |
| 202 |
found reference `&_` |
| 203 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 204 |
|
| 205 |
error[E0308]: mismatched types |
| 206 |
--> $DIR/transmute_ref.rs:62:49 |
| 207 |
| |
| 208 |
62 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(0usize); |
| 209 |
| ---------------^^^^^^- |
| 210 |
| | | |
| 211 |
| | expected `&_`, found `usize` |
| 212 |
| expected due to this |
| 213 |
| |
| 214 |
= note: expected reference `&_` |
| 215 |
found type `usize` |
| 216 |
help: consider borrowing here |
| 217 |
| |
| 218 |
62 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(&0usize); |
| 219 |
| + |
| 220 |
|
| 221 |
error[E0277]: the trait bound `SrcA: IntoBytes` is not satisfied |
| 222 |
--> $DIR/transmute_ref.rs:70:33 |
| 223 |
| |
| 224 |
70 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&SrcA(AU16(0))); |
| 225 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 226 |
| | |
| 227 |
| unsatisfied trait bound |
| 228 |
| required by a bound introduced by this call |
| 229 |
| |
| 230 |
help: the trait `IntoBytes` is not implemented for `SrcA` |
| 231 |
--> $DIR/transmute_ref.rs:67:1 |
| 232 |
| |
| 233 |
67 | struct SrcA(AU16); |
| 234 |
| ^^^^^^^^^^^ |
| 235 |
= note: Consider adding `#[derive(IntoBytes)]` to `SrcA` |
| 236 |
= help: the following other types implement trait `IntoBytes`: |
| 237 |
() |
| 238 |
AU16 |
| 239 |
AtomicBool |
| 240 |
AtomicI16 |
| 241 |
AtomicI32 |
| 242 |
AtomicI64 |
| 243 |
AtomicI8 |
| 244 |
AtomicIsize |
| 245 |
and 69 others |
| 246 |
note: required by a bound in `SRC_NOT_AS_BYTES::AssertSrcIsIntoBytes` |
| 247 |
--> $DIR/transmute_ref.rs:70:33 |
| 248 |
| |
| 249 |
70 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&SrcA(AU16(0))); |
| 250 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsIntoBytes` |
| 251 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 252 |
|
| 253 |
error[E0277]: the trait bound `SrcA: IntoBytes` is not satisfied |
| 254 |
--> $DIR/transmute_ref.rs:70:33 |
| 255 |
| |
| 256 |
70 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&SrcA(AU16(0))); |
| 257 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound |
| 258 |
| |
| 259 |
help: the trait `IntoBytes` is not implemented for `SrcA` |
| 260 |
--> $DIR/transmute_ref.rs:67:1 |
| 261 |
| |
| 262 |
67 | struct SrcA(AU16); |
| 263 |
| ^^^^^^^^^^^ |
| 264 |
= note: Consider adding `#[derive(IntoBytes)]` to `SrcA` |
| 265 |
= help: the following other types implement trait `IntoBytes`: |
| 266 |
() |
| 267 |
AU16 |
| 268 |
AtomicBool |
| 269 |
AtomicI16 |
| 270 |
AtomicI32 |
| 271 |
AtomicI64 |
| 272 |
AtomicI8 |
| 273 |
AtomicIsize |
| 274 |
and 69 others |
| 275 |
note: required by a bound in `SRC_NOT_AS_BYTES::AssertSrcIsIntoBytes` |
| 276 |
--> $DIR/transmute_ref.rs:70:33 |
| 277 |
| |
| 278 |
70 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&SrcA(AU16(0))); |
| 279 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsIntoBytes` |
| 280 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 281 |
|
| 282 |
error[E0277]: the trait bound `SrcB: Immutable` is not satisfied |
| 283 |
--> $DIR/transmute_ref.rs:79:34 |
| 284 |
| |
| 285 |
79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0))); |
| 286 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 287 |
| | |
| 288 |
| unsatisfied trait bound |
| 289 |
| required by a bound introduced by this call |
| 290 |
| |
| 291 |
help: the trait `Immutable` is not implemented for `SrcB` |
| 292 |
--> $DIR/transmute_ref.rs:76:1 |
| 293 |
| |
| 294 |
76 | struct SrcB(AU16); |
| 295 |
| ^^^^^^^^^^^ |
| 296 |
= note: Consider adding `#[derive(Immutable)]` to `SrcB` |
| 297 |
= help: the following other types implement trait `Immutable`: |
| 298 |
&T |
| 299 |
&mut T |
| 300 |
() |
| 301 |
(A, B) |
| 302 |
(A, B, C) |
| 303 |
(A, B, C, D) |
| 304 |
(A, B, C, D, E) |
| 305 |
(A, B, C, D, E, F) |
| 306 |
and 130 others |
| 307 |
note: required by a bound in `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable` |
| 308 |
--> $DIR/transmute_ref.rs:79:34 |
| 309 |
| |
| 310 |
79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0))); |
| 311 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsImmutable` |
| 312 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 313 |
= note: consider using `--verbose` to print the full type name to the console |
| 314 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 315 |
|
| 316 |
error[E0277]: the trait bound `SrcB: Immutable` is not satisfied |
| 317 |
--> $DIR/transmute_ref.rs:79:34 |
| 318 |
| |
| 319 |
79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0))); |
| 320 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound |
| 321 |
| |
| 322 |
help: the trait `Immutable` is not implemented for `SrcB` |
| 323 |
--> $DIR/transmute_ref.rs:76:1 |
| 324 |
| |
| 325 |
76 | struct SrcB(AU16); |
| 326 |
| ^^^^^^^^^^^ |
| 327 |
= note: Consider adding `#[derive(Immutable)]` to `SrcB` |
| 328 |
= help: the following other types implement trait `Immutable`: |
| 329 |
&T |
| 330 |
&mut T |
| 331 |
() |
| 332 |
(A, B) |
| 333 |
(A, B, C) |
| 334 |
(A, B, C, D) |
| 335 |
(A, B, C, D, E) |
| 336 |
(A, B, C, D, E, F) |
| 337 |
and 130 others |
| 338 |
note: required by a bound in `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable` |
| 339 |
--> $DIR/transmute_ref.rs:79:34 |
| 340 |
| |
| 341 |
79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0))); |
| 342 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsImmutable` |
| 343 |
= note: the full name for the type has been written to '/long-type-HASH.txt' |
| 344 |
= note: consider using `--verbose` to print the full type name to the console |
| 345 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 346 |
|
| 347 |
error[E0599]: the method `transmute_ref` exists for struct `Wrap<&[u8], &[u8; 1]>`, but its trait bounds were not satisfied |
| 348 |
--> $DIR/transmute_ref.rs:84:31 |
| 349 |
| |
| 350 |
84 | const SRC_UNSIZED: &[u8; 1] = transmute_ref!(&[0u8][..]); |
| 351 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 352 |
| |
| 353 |
::: $WORKSPACE/src/util/macro_util.rs:694:1 |
| 354 |
| |
| 355 |
694 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>); |
| 356 |
| ------------------------- doesn't satisfy `Wrap<&[u8], &[u8; 1]>: TransmuteRefDst<'_>` |
| 357 |
| |
| 358 |
= note: the following trait bounds were not satisfied: |
| 359 |
`[u8]: Sized` |
| 360 |
`<[u8; 1] as KnownLayout>::PointerMetadata = usize` |
| 361 |
which is required by `Wrap<&[u8], &[u8; 1]>: TransmuteRefDst<'_>` |
| 362 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 363 |
|
| 364 |
error: aborting due to 21 previous errors |
| 365 |
|
| 366 |
Some errors have detailed explanations: E0277, E0308, E0599. |
| 367 |
For more information about an error, try `rustc --explain E0277`. |