Alignment: move from ptr to mem and rename as_nonzero to as_nonzero_usize#154004
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Should the identifier not be |
|
That's an interesting observation, and after looking into precedent… it could be either way. Searching for "non" in the standard library docs: https://doc.rust-lang.org/nightly/std/?search=non Excluding false positives, we have the following which are stable:
And the following unstable:
So, really, the answer is that there's not really been a consistent choice, except that In general… we do tend to prefer |
|
cc @scottmcm on the above since you've been involved pretty heavily with this type. I'll also nominate for libs-api, it sounds like this might be on the way towards stabilizing so probably worth making a call on that bikeshed. r=me on the impl itself |
|
(FWIW the bikeshed could probably be decided in the actual stabilisation thread, since the main benefit is moving the module, and that's what generated the big diff, but this method name is a relatively tiny change that can be done with stabilisation.) |
|
Since we have a PR for this with an @bors r=Mark-Simulacrum rollup=iffy (looks conflict-prone in mir blessings) |
…usize, r=Mark-Simulacrum `Alignment`: move from `ptr` to `mem` and rename `as_nonzero` to `as_nonzero_usize` - tracking issue: rust-lang#102070 - split off from rust-lang#153261
|
This pull request was unapproved. This PR was contained in a rollup (#154240), which was unapproved. |
|
Bikeshed result is no change needed to current PR, so, should be good once the conflicts are resolved. Probably needs a rebase and to verify the tests pass; there might be some tests only run in the main CI that don't show up for PRs. |
a724880 to
2cbf669
Compare
This comment has been minimized.
This comment has been minimized.
|
This pull request was unapproved. This PR was contained in a rollup (#154347), which was unapproved. |
2cbf669 to
ba1e06a
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I tried to run mir-opt tests locally, but couldn't get some of the windows ones to work, so maybe a try job for tests-various (or what's it called) would make sense? |
|
@bors try jobs=test-various |
This comment has been minimized.
This comment has been minimized.
`Alignment`: move from `ptr` to `mem` and rename `as_nonzero` to `as_nonzero_usize` try-job: test-various
I'm not sure what you mean -- there are no windows-specific mir-opt tests as far as I know.
(But if the try job comes back clean then maybe you got everything already.) |
|
With CI and that job happy, let's try again... |
…usize, r=scottmcm `Alignment`: move from `ptr` to `mem` and rename `as_nonzero` to `as_nonzero_usize` - tracking issue: rust-lang#102070 - split off from rust-lang#153261
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 23903d0 (parent) -> ac40f5e (this PR) Test differencesShow 358 test diffs358 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard ac40f5e105ddc8144904679cb63c8879708a9a26 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (ac40f5e): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 6.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -3.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 494.635s -> 484.633s (-2.02%) |
View all comments
ptr::Alignmenttype #102070ptr_alignment_typeasalignment_type#153261