Remove [T]::array_chunks(_mut)#143289
Conversation
| pub fn from_utf16le(v: &[u8]) -> Result<String, FromUtf16Error> { | ||
| if v.len() % 2 != 0 { | ||
| let (chunks, []) = v.as_chunks::<2>() else { | ||
| return Err(FromUtf16Error(())); | ||
| } | ||
| }; | ||
| match (cfg!(target_endian = "little"), unsafe { v.align_to::<u16>() }) { | ||
| (true, ([], v, [])) => Self::from_utf16(v), | ||
| _ => char::decode_utf16(v.array_chunks::<2>().copied().map(u16::from_le_bytes)) | ||
| _ => char::decode_utf16(chunks.iter().copied().map(u16::from_le_bytes)) | ||
| .collect::<Result<_, _>>() | ||
| .map_err(|_| FromUtf16Error(())), | ||
| } |
There was a problem hiding this comment.
Hooray for let-else and slice patterns meaning this can write "the chunks with no tail", rather than needing to have an explicit % 2.
This comment has been minimized.
This comment has been minimized.
|
From #74985 (comment):
@rfcbot merge |
|
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. 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! See this document for info about what commands tagged team members can give me. |
|
Let me know when CI is passing an I can take a look. |
9c9725c to
4814b93
Compare
This comment has been minimized.
This comment has been minimized.
4814b93 to
bc6d1c2
Compare
|
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
| #![cfg_attr(test, feature(cfg_select))] | ||
| #![feature(alloc_layout_extra)] | ||
| #![feature(array_chunks)] | ||
| #![feature(array_ptr_get)] |
There was a problem hiding this comment.
Achievement Acquired: first CI failure from a .patch file.
|
@jhpratt This is passing CI now, if you want to take a look, but no rush since it can't land in less than 10 days anyway. |
|
LGTM! |
|
Friendly reminder for the p-FCP here (#143289 (comment)), @joshtriplett @m-ou-se @BurntSushi |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
bc6d1c2 to
84919a4
Compare
This comment has been minimized.
This comment has been minimized.
84919a4 to
173926d
Compare
|
Trying the weird platforms that failed in the rollup... |
Remove `[T]::array_chunks(_mut)` try-job: dist-various-1 try-job: dist-various-2
|
Well the job that failed in the rollup passed, so let's give it another shot |
…pratt Remove `[T]::array_chunks(_mut)` Since libs-api is proposing as much in rust-lang#74985 (comment) Closes rust-lang#74985 Closes rust-lang#76354 try-job: dist-various-1 try-job: dist-various-2
Rollup of 11 pull requests Successful merges: - #143289 (Remove `[T]::array_chunks(_mut)`) - #143883 (Add `--link-targets-dir` argument to linkchecker) - #144034 (tests: Test line number in debuginfo for diverging function calls) - #144236 (Add `core::mem::DropGuard`) - #144268 (Add method `find_ancestor_not_from_macro` and `find_ancestor_not_from_extern_macro` to supersede `find_oldest_ancestor_in_same_ctxt`) - #144303 (Consolidate staging for `rustc_private` tools) - #144539 (constify with_exposed_provenance) - #144569 (rustc-dev-guide subtree update) - #144573 (Raw Pointers are Constant PatKinds too) - #144578 (Ensure correct aligement of rustc_hir::Lifetime on platforms with lower default alignments.) - #144582 (fix `Atomic*::as_ptr` wording) r? `@ghost` `@rustbot` modify labels: rollup
|
☀️ Test successful - checks-actions |
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 cdccba8 (parent) -> cb6785f (this PR) Test differencesShow 347 test diffsStage 1
Additionally, 333 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard cb6785f73df1aa3f558796a22a4ab9652cf38e26 --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 (cb6785f): comparison URL. Overall result: ✅ improvements - 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 (primary -0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -3.7%)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: 469.046s -> 467.912s (-0.24%) |
Remove `[T]::array_chunks(_mut)` Since libs-api is proposing as much in rust-lang#74985 (comment) Closes rust-lang#74985 Closes rust-lang#76354 try-job: dist-various-1 try-job: dist-various-2
Since libs-api is proposing as much in #74985 (comment)
Closes #74985
Closes #76354
try-job: dist-various-1
try-job: dist-various-2