-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stabilize repr128
#138285
base: master
Are you sure you want to change the base?
Stabilize repr128
#138285
Conversation
Some changes occurred in tests/rustdoc-json Some changes occurred in src/tools/clippy cc @rust-lang/clippy This PR modifies cc @jieyouxu |
…3, r=compiler-errors triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search (… Followup to rust-lang#137958. I managed to miss a place, as shown by the questionable labeling of rust-lang#138285.
…3, r=compiler-errors triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search (… Followup to rust-lang#137958. I managed to miss a place, as shown by the questionable labeling of rust-lang#138285.
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: Concerns:
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
cc @rust-lang/opsem @rust-lang/wg-llvm @wesleywiser @workingjubilee @chorman0773 @RalfJung @bjorn3 @ehuss |
…3, r=compiler-errors triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search (… Followup to rust-lang#137958. I managed to miss a place, as shown by the questionable labeling of rust-lang#138285.
…3, r=compiler-errors triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search (… Followup to rust-lang#137958. I managed to miss a place, as shown by the questionable labeling of rust-lang#138285.
Rollup merge of rust-lang#138286 - aDotInTheVoid:aDotInTheVoid-patch-3, r=compiler-errors triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search (… Followup to rust-lang#137958. I managed to miss a place, as shown by the questionable labeling of rust-lang#138285.
Stabilisation report
The
repr128
feature (tracking issue) allows the use of#[repr(u128)]
and#[repr(i128)]
on enums in the same way that other primitive representations such as#[repr(u64)]
can be used. For example:This is the final part of adding 128-bit integers to Rust (RFC 1504); all other parts of 128-bit integer support were stabilised in #49101 back in 2018.
From a design perspective,
#[repr(u128)]
/#[repr(i128)]
function like#[repr(u64)]
/#[repr(i64)]
but for 128-bit integers instead of 64-bit integers. The only differences are:u128
/i128
are not currently considered FFI safe, neither are#[repr(u128)]
/#[repr(i128)]
enums (I discovered this wasn't the case while drafting this stabilisation report, so I have submitted Add#[repr(u128)]
/#[repr(i128)]
enums toimproper_ctypes_definitions
#138282 to fix this).rustc
will emit valid debuginfo for both DWARF and PDB (PDB makes use of the same natvis that is also used for all enums with fields, whereas DWARF has native support).Tests for
#[repr(u128)]
/#[repr(i128)]
enums include:Stabilising this feature does not require any changes to the Rust Reference as the documentation on primitive representations already includes
u128
andi128
.Closes #56071
r? lang
@rustbot label +I-lang-nominated +T-lang