-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Some small cleanups in rustc_abi
#116313
Some small cleanups in rustc_abi
#116313
Conversation
To match `parse_address_space` and `parse_bits` above.
compiler/rustc_abi/src/layout.rs
Outdated
if repr.can_randomize_type_layout() && cfg!(feature = "randomize") { | ||
#[cfg(feature = "randomize")] | ||
{ | ||
// `ReprOptions.layout_seed` is a deterministic seed that we can use to | ||
// randomize field ordering with | ||
let mut rng = Xoshiro128StarStar::seed_from_u64(repr.field_shuffle_seed.as_u64()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Xoshiro128StarStar
import is conditional on that feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I see. I will remove that commit.
Now I'm wondering why the "randomize" feature exists. I bet it's never disabled within rustc itself. rust-analyzer, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is currently disabled in rust-analyzer yes, and now that it's depended on the Hash64
type of rustc_data_structures
r-a is unlikely to ever enable it as we don't want to pull in that crate.
By making every `alt_foo` exactly match a `foo`.
I have updated the code, removing the commit touching the feature gates. |
@bors r+ rollup |
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#116313 (Some small cleanups in `rustc_abi`) - rust-lang#116326 (Correct misleading std::fmt::Binary example (rust-lang#116165)) - rust-lang#116340 (`skip_binder` to `instantiate_identity`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#116313 - nnethercote:rustc_abi, r=the8472 Some small cleanups in `rustc_abi` Minor things I found while looking at this crate's code. r? `@the8472`
23: Fix divergence from upstream `master` r=tshepang a=pvdrz * rust-lang/rust#116381 * rust-lang/rust#116360 * rust-lang/rust#116353 * rust-lang/rust#116406 * rust-lang/rust#116408 * rust-lang/rust#116395 * rust-lang/rust#116393 * rust-lang/rust#116388 * rust-lang/rust#116365 * rust-lang/rust#116363 * rust-lang/rust#116146 * rust-lang/rust#115961 * rust-lang/rust#116386 * rust-lang/rust#116367 * rust-lang/rust#105394 * rust-lang/rust#115301 * rust-lang/rust#116384 * rust-lang/rust#116379 * rust-lang/rust#116328 * rust-lang/rust#116282 * rust-lang/rust#116261 * rust-lang/rust#114654 * rust-lang/rust#116376 * rust-lang/rust#116374 * rust-lang/rust#116371 * rust-lang/rust#116358 * rust-lang/rust#116210 * rust-lang/rust#115863 * rust-lang/rust#115025 * rust-lang/rust#116372 * rust-lang/rust#116361 * rust-lang/rust#116355 * rust-lang/rust#116351 * rust-lang/rust#116158 * rust-lang/rust#115726 * rust-lang/rust#113053 * rust-lang/rust#116083 * rust-lang/rust#102099 * rust-lang/rust#116356 * rust-lang/rust#116350 * rust-lang/rust#116349 * rust-lang/rust#116289 * rust-lang/rust#114454 * rust-lang/rust#114453 * rust-lang/rust#116331 * rust-lang/rust#116346 * rust-lang/rust#116340 * rust-lang/rust#116326 * rust-lang/rust#116313 * rust-lang/rust#116276 * rust-lang/rust#115898 * rust-lang/rust#116325 * rust-lang/rust#116317 * rust-lang/rust#116207 * rust-lang/rust#116281 * rust-lang/rust#116304 * rust-lang/rust#116259 * rust-lang/rust#116228 * rust-lang/rust#116224 * rust-lang/rust#115554 * rust-lang/rust#116311 * rust-lang/rust#116299 * rust-lang/rust#116295 * rust-lang/rust#116292 * rust-lang/rust#116307 * rust-lang/rust#115670 * rust-lang/rust#116225 * rust-lang/rust#116302 * rust-lang/rust#116108 * rust-lang/rust#116160 * rust-lang/rust#116157 * rust-lang/rust#116127 * rust-lang/rust#116286 * rust-lang/rust#116254 * rust-lang/rust#116195 * rust-lang/rust#116280 * rust-lang/rust#115933 * rust-lang/rust#115546 * rust-lang/rust#115368 * rust-lang/rust#116275 * rust-lang/rust#116263 * rust-lang/rust#116241 * rust-lang/rust#116216 * rust-lang/rust#116030 * rust-lang/rust#116024 * rust-lang/rust#112123 * rust-lang/rust#113301 * rust-lang/rust#113797 * rust-lang/rust#115759 * rust-lang/rust#116260 * rust-lang/rust#116253 * rust-lang/rust#116245 * rust-lang/rust#116239 * rust-lang/rust#116234 * rust-lang/rust#116231 * rust-lang/rust#116201 * rust-lang/rust#116133 * rust-lang/rust#116176 * rust-lang/rust#116089 * rust-lang/rust#115986 Co-authored-by: ouz-a <ouz.agz@gmail.com> Co-authored-by: Jakub Beránek <berykubik@gmail.com> Co-authored-by: Federico Stra <stra.federico@gmail.com> Co-authored-by: bohan <bohan-zhang@foxmail.com> Co-authored-by: Jason Newcomb <jsnewcomb@pm.me> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de>
23: Fix divergence from upstream `master` r=tshepang a=pvdrz * rust-lang/rust#116483 * rust-lang/rust#116475 * rust-lang/rust#116329 * rust-lang/rust#116198 * rust-lang/rust#115588 * rust-lang/rust#115522 * rust-lang/rust#115454 * rust-lang/rust#111595 * rust-lang/rust#116018 * rust-lang/rust#116472 * rust-lang/rust#116469 * rust-lang/rust#116421 * rust-lang/rust#116463 * rust-lang/rust#101150 * rust-lang/rust#116269 * rust-lang/rust#116417 * rust-lang/rust#116455 * rust-lang/rust#116452 * rust-lang/rust#116428 * rust-lang/rust#116415 * rust-lang/rust#116288 * rust-lang/rust#116220 * rust-lang/rust#103046 * rust-lang/rust#114042 * rust-lang/rust#104153 * rust-lang/rust#116427 * rust-lang/rust#116443 * rust-lang/rust#116432 * rust-lang/rust#116431 * rust-lang/rust#116429 * rust-lang/rust#116296 * rust-lang/rust#116223 * rust-lang/rust#116273 * rust-lang/rust#116184 * rust-lang/rust#116370 * rust-lang/rust#114417 * rust-lang/rust#115200 * rust-lang/rust#116413 * rust-lang/rust#116381 * rust-lang/rust#116360 * rust-lang/rust#116353 * rust-lang/rust#116406 * rust-lang/rust#116408 * rust-lang/rust#116395 * rust-lang/rust#116393 * rust-lang/rust#116388 * rust-lang/rust#116365 * rust-lang/rust#116363 * rust-lang/rust#116146 * rust-lang/rust#115961 * rust-lang/rust#116386 * rust-lang/rust#116367 * rust-lang/rust#105394 * rust-lang/rust#115301 * rust-lang/rust#116384 * rust-lang/rust#116379 * rust-lang/rust#116328 * rust-lang/rust#116282 * rust-lang/rust#116261 * rust-lang/rust#114654 * rust-lang/rust#116376 * rust-lang/rust#116374 * rust-lang/rust#116371 * rust-lang/rust#116358 * rust-lang/rust#116210 * rust-lang/rust#115863 * rust-lang/rust#115025 * rust-lang/rust#116372 * rust-lang/rust#116361 * rust-lang/rust#116355 * rust-lang/rust#116351 * rust-lang/rust#116158 * rust-lang/rust#115726 * rust-lang/rust#113053 * rust-lang/rust#116083 * rust-lang/rust#102099 * rust-lang/rust#116356 * rust-lang/rust#116350 * rust-lang/rust#116349 * rust-lang/rust#116289 * rust-lang/rust#114454 * rust-lang/rust#114453 * rust-lang/rust#116331 * rust-lang/rust#116346 * rust-lang/rust#116340 * rust-lang/rust#116326 * rust-lang/rust#116313 * rust-lang/rust#116276 * rust-lang/rust#115898 * rust-lang/rust#116325 * rust-lang/rust#116317 * rust-lang/rust#116207 * rust-lang/rust#116281 * rust-lang/rust#116304 * rust-lang/rust#116259 * rust-lang/rust#116228 * rust-lang/rust#116224 * rust-lang/rust#115554 * rust-lang/rust#116311 * rust-lang/rust#116299 * rust-lang/rust#116295 * rust-lang/rust#116292 * rust-lang/rust#116307 * rust-lang/rust#115670 * rust-lang/rust#116225 * rust-lang/rust#116302 * rust-lang/rust#116108 * rust-lang/rust#116160 * rust-lang/rust#116157 * rust-lang/rust#116127 * rust-lang/rust#116286 * rust-lang/rust#116254 * rust-lang/rust#116195 * rust-lang/rust#116280 * rust-lang/rust#115933 * rust-lang/rust#115546 * rust-lang/rust#115368 * rust-lang/rust#116275 * rust-lang/rust#116263 * rust-lang/rust#116241 * rust-lang/rust#116216 * rust-lang/rust#116030 * rust-lang/rust#116024 * rust-lang/rust#112123 * rust-lang/rust#113301 * rust-lang/rust#113797 * rust-lang/rust#115759 * rust-lang/rust#116260 * rust-lang/rust#116253 * rust-lang/rust#116245 * rust-lang/rust#116239 * rust-lang/rust#116234 * rust-lang/rust#116231 * rust-lang/rust#116201 * rust-lang/rust#116133 * rust-lang/rust#116176 * rust-lang/rust#116089 * rust-lang/rust#115986 Co-authored-by: ouz-a <ouz.agz@gmail.com> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: linkmauve <linkmauve@linkmauve.fr> Co-authored-by: onur-ozkan <work@onurozkan.dev> Co-authored-by: asquared31415 <34665709+asquared31415@users.noreply.github.com> Co-authored-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Nadrieril <nadrieril+git@gmail.com> Co-authored-by: Raekye <Raekye@users.noreply.github.com> Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com>
23: Fix divergence from upstream `master` r=pietroalbini a=pvdrz * rust-lang/rust#116483 * rust-lang/rust#116475 * rust-lang/rust#116329 * rust-lang/rust#116198 * rust-lang/rust#115588 * rust-lang/rust#115522 * rust-lang/rust#115454 * rust-lang/rust#111595 * rust-lang/rust#116018 * rust-lang/rust#116472 * rust-lang/rust#116469 * rust-lang/rust#116421 * rust-lang/rust#116463 * rust-lang/rust#101150 * rust-lang/rust#116269 * rust-lang/rust#116417 * rust-lang/rust#116455 * rust-lang/rust#116452 * rust-lang/rust#116428 * rust-lang/rust#116415 * rust-lang/rust#116288 * rust-lang/rust#116220 * rust-lang/rust#103046 * rust-lang/rust#114042 * rust-lang/rust#104153 * rust-lang/rust#116427 * rust-lang/rust#116443 * rust-lang/rust#116432 * rust-lang/rust#116431 * rust-lang/rust#116429 * rust-lang/rust#116296 * rust-lang/rust#116223 * rust-lang/rust#116273 * rust-lang/rust#116184 * rust-lang/rust#116370 * rust-lang/rust#114417 * rust-lang/rust#115200 * rust-lang/rust#116413 * rust-lang/rust#116381 * rust-lang/rust#116360 * rust-lang/rust#116353 * rust-lang/rust#116406 * rust-lang/rust#116408 * rust-lang/rust#116395 * rust-lang/rust#116393 * rust-lang/rust#116388 * rust-lang/rust#116365 * rust-lang/rust#116363 * rust-lang/rust#116146 * rust-lang/rust#115961 * rust-lang/rust#116386 * rust-lang/rust#116367 * rust-lang/rust#105394 * rust-lang/rust#115301 * rust-lang/rust#116384 * rust-lang/rust#116379 * rust-lang/rust#116328 * rust-lang/rust#116282 * rust-lang/rust#116261 * rust-lang/rust#114654 * rust-lang/rust#116376 * rust-lang/rust#116374 * rust-lang/rust#116371 * rust-lang/rust#116358 * rust-lang/rust#116210 * rust-lang/rust#115863 * rust-lang/rust#115025 * rust-lang/rust#116372 * rust-lang/rust#116361 * rust-lang/rust#116355 * rust-lang/rust#116351 * rust-lang/rust#116158 * rust-lang/rust#115726 * rust-lang/rust#113053 * rust-lang/rust#116083 * rust-lang/rust#102099 * rust-lang/rust#116356 * rust-lang/rust#116350 * rust-lang/rust#116349 * rust-lang/rust#116289 * rust-lang/rust#114454 * rust-lang/rust#114453 * rust-lang/rust#116331 * rust-lang/rust#116346 * rust-lang/rust#116340 * rust-lang/rust#116326 * rust-lang/rust#116313 * rust-lang/rust#116276 * rust-lang/rust#115898 * rust-lang/rust#116325 * rust-lang/rust#116317 * rust-lang/rust#116207 * rust-lang/rust#116281 * rust-lang/rust#116304 * rust-lang/rust#116259 * rust-lang/rust#116228 * rust-lang/rust#116224 * rust-lang/rust#115554 * rust-lang/rust#116311 * rust-lang/rust#116299 * rust-lang/rust#116295 * rust-lang/rust#116292 * rust-lang/rust#116307 * rust-lang/rust#115670 * rust-lang/rust#116225 * rust-lang/rust#116302 * rust-lang/rust#116108 * rust-lang/rust#116160 * rust-lang/rust#116157 * rust-lang/rust#116127 * rust-lang/rust#116286 * rust-lang/rust#116254 * rust-lang/rust#116195 * rust-lang/rust#116280 * rust-lang/rust#115933 * rust-lang/rust#115546 * rust-lang/rust#115368 * rust-lang/rust#116275 * rust-lang/rust#116263 * rust-lang/rust#116241 * rust-lang/rust#116216 * rust-lang/rust#116030 * rust-lang/rust#116024 * rust-lang/rust#112123 * rust-lang/rust#113301 * rust-lang/rust#113797 * rust-lang/rust#115759 * rust-lang/rust#116260 * rust-lang/rust#116253 * rust-lang/rust#116245 * rust-lang/rust#116239 * rust-lang/rust#116234 * rust-lang/rust#116231 * rust-lang/rust#116201 * rust-lang/rust#116133 * rust-lang/rust#116176 * rust-lang/rust#116089 * rust-lang/rust#115986 Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: ouz-a <ouz.agz@gmail.com> Co-authored-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: linkmauve <linkmauve@linkmauve.fr> Co-authored-by: onur-ozkan <work@onurozkan.dev> Co-authored-by: asquared31415 <34665709+asquared31415@users.noreply.github.com> Co-authored-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Nadrieril <nadrieril+git@gmail.com> Co-authored-by: Raekye <Raekye@users.noreply.github.com> Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com>
23: Fix divergence from upstream `master` r=Dajamante a=pvdrz * rust-lang/rust#116483 * rust-lang/rust#116475 * rust-lang/rust#116329 * rust-lang/rust#116198 * rust-lang/rust#115588 * rust-lang/rust#115522 * rust-lang/rust#115454 * rust-lang/rust#111595 * rust-lang/rust#116018 * rust-lang/rust#116472 * rust-lang/rust#116469 * rust-lang/rust#116421 * rust-lang/rust#116463 * rust-lang/rust#101150 * rust-lang/rust#116269 * rust-lang/rust#116417 * rust-lang/rust#116455 * rust-lang/rust#116452 * rust-lang/rust#116428 * rust-lang/rust#116415 * rust-lang/rust#116288 * rust-lang/rust#116220 * rust-lang/rust#103046 * rust-lang/rust#114042 * rust-lang/rust#104153 * rust-lang/rust#116427 * rust-lang/rust#116443 * rust-lang/rust#116432 * rust-lang/rust#116431 * rust-lang/rust#116429 * rust-lang/rust#116296 * rust-lang/rust#116223 * rust-lang/rust#116273 * rust-lang/rust#116184 * rust-lang/rust#116370 * rust-lang/rust#114417 * rust-lang/rust#115200 * rust-lang/rust#116413 * rust-lang/rust#116381 * rust-lang/rust#116360 * rust-lang/rust#116353 * rust-lang/rust#116406 * rust-lang/rust#116408 * rust-lang/rust#116395 * rust-lang/rust#116393 * rust-lang/rust#116388 * rust-lang/rust#116365 * rust-lang/rust#116363 * rust-lang/rust#116146 * rust-lang/rust#115961 * rust-lang/rust#116386 * rust-lang/rust#116367 * rust-lang/rust#105394 * rust-lang/rust#115301 * rust-lang/rust#116384 * rust-lang/rust#116379 * rust-lang/rust#116328 * rust-lang/rust#116282 * rust-lang/rust#116261 * rust-lang/rust#114654 * rust-lang/rust#116376 * rust-lang/rust#116374 * rust-lang/rust#116371 * rust-lang/rust#116358 * rust-lang/rust#116210 * rust-lang/rust#115863 * rust-lang/rust#115025 * rust-lang/rust#116372 * rust-lang/rust#116361 * rust-lang/rust#116355 * rust-lang/rust#116351 * rust-lang/rust#116158 * rust-lang/rust#115726 * rust-lang/rust#113053 * rust-lang/rust#116083 * rust-lang/rust#102099 * rust-lang/rust#116356 * rust-lang/rust#116350 * rust-lang/rust#116349 * rust-lang/rust#116289 * rust-lang/rust#114454 * rust-lang/rust#114453 * rust-lang/rust#116331 * rust-lang/rust#116346 * rust-lang/rust#116340 * rust-lang/rust#116326 * rust-lang/rust#116313 * rust-lang/rust#116276 * rust-lang/rust#115898 * rust-lang/rust#116325 * rust-lang/rust#116317 * rust-lang/rust#116207 * rust-lang/rust#116281 * rust-lang/rust#116304 * rust-lang/rust#116259 * rust-lang/rust#116228 * rust-lang/rust#116224 * rust-lang/rust#115554 * rust-lang/rust#116311 * rust-lang/rust#116299 * rust-lang/rust#116295 * rust-lang/rust#116292 * rust-lang/rust#116307 * rust-lang/rust#115670 * rust-lang/rust#116225 * rust-lang/rust#116302 * rust-lang/rust#116108 * rust-lang/rust#116160 * rust-lang/rust#116157 * rust-lang/rust#116127 * rust-lang/rust#116286 * rust-lang/rust#116254 * rust-lang/rust#116195 * rust-lang/rust#116280 * rust-lang/rust#115933 * rust-lang/rust#115546 * rust-lang/rust#115368 * rust-lang/rust#116275 * rust-lang/rust#116263 * rust-lang/rust#116241 * rust-lang/rust#116216 * rust-lang/rust#116030 * rust-lang/rust#116024 * rust-lang/rust#112123 * rust-lang/rust#113301 * rust-lang/rust#113797 * rust-lang/rust#115759 * rust-lang/rust#116260 * rust-lang/rust#116253 * rust-lang/rust#116245 * rust-lang/rust#116239 * rust-lang/rust#116234 * rust-lang/rust#116231 * rust-lang/rust#116201 * rust-lang/rust#116133 * rust-lang/rust#116176 * rust-lang/rust#116089 * rust-lang/rust#115986 35: Automated pull from `rust-lang/libc` r=pietroalbini a=github-actions[bot] This PR pulls the following changes from the [`rust-lang/libc`](https://github.com/rust-lang/libc) repository: * rust-lang/libc#3335 * rust-lang/libc#3373 * rust-lang/libc#3360 * rust-lang/libc#3374 * rust-lang/libc#3375 * rust-lang/libc#3376 * rust-lang/libc#3377 Co-authored-by: ouz-a <ouz.agz@gmail.com> Co-authored-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: linkmauve <linkmauve@linkmauve.fr> Co-authored-by: onur-ozkan <work@onurozkan.dev> Co-authored-by: asquared31415 <34665709+asquared31415@users.noreply.github.com> Co-authored-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Nadrieril <nadrieril+git@gmail.com> Co-authored-by: Raekye <Raekye@users.noreply.github.com> Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com> Co-authored-by: Nikolay Arhipov <nikolajs.arhipovs@gmail.com> Co-authored-by: Brian Cain <bcain@quicinc.com> Co-authored-by: Steve Lau <stevelauc@outlook.com> Co-authored-by: David CARLIER <devnexen@gmail.com> Co-authored-by: Louis Dupré Bertoni <louisdb@lespetitspedestres.org> Co-authored-by: Taiki Endo <te316e89@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Minor things I found while looking at this crate's code.
r? @the8472