-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This macro is like the existing `transmute!`, but it transmutes immutable references rather than values. Release 0.7.8. Issue #159
- Loading branch information
Showing
101 changed files
with
2,477 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ui-nightly/transmute-ref-alignment-increase.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types | ||
--> tests/ui-msrv/transmute-ref-alignment-increase.rs:15:35 | ||
| | ||
15 | const INCREASE_ALIGNMENT: &AU16 = transmute_ref!(&[0u8; 2]); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: source type: `AlignOf<[u8; 2]>` (8 bits) | ||
= note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits) | ||
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ui-nightly/transmute-ref-dst-generic.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error[E0405]: cannot find trait `FromBytes` in this scope | ||
--> tests/ui-msrv/transmute-ref-dst-generic.rs:11:21 | ||
| | ||
11 | fn transmute_ref<T: FromBytes>(u: &u8) -> &T { | ||
| ^^^^^^^^^ not found in this scope | ||
| | ||
help: consider importing this trait | ||
| | ||
7 | use zerocopy::FromBytes; | ||
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ui-nightly/transmute-ref-dst-mutable.rs |
Oops, something went wrong.