[macros] Support shrinking value transmutes#2570
Merged
joshlf merged 0 commit intoI10874e2bc703fb6b7fcdea050b8971de869a850afrom Jun 9, 2025
Merged
Conversation
This was referenced Jun 6, 2025
6d1c83d to
e8ec635
Compare
90c0f6c to
abd185a
Compare
e8ec635 to
706fcd7
Compare
abd185a to
8791f83
Compare
706fcd7 to
44126b5
Compare
081ba1d to
0ecd08b
Compare
44126b5 to
260e2e3
Compare
0ecd08b to
d25d4fc
Compare
184dbb5 to
18a049a
Compare
d25d4fc to
3517fc2
Compare
18a049a to
cd0c968
Compare
3517fc2 to
43c69f1
Compare
cd0c968 to
10e1604
Compare
43c69f1 to
370763d
Compare
10e1604 to
d494109
Compare
370763d to
f625d09
Compare
d494109 to
67b20da
Compare
f625d09 to
0dc4ac5
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
transmute!, support an#![allow(shrink)]attribute which isinvoked as follows:
transmute!(#![allow(shrink)] src);
When this attribute is provided,
transmute!will permit shrinkingtransmutes, in which the destination value may be smaller than the
source value.
This PR is on branch transmute-ref-dst.