about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/errors.rs
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-07-22 16:44:03 +0800
committerGitHub <noreply@github.com>2024-07-22 16:44:03 +0800
commit9f4039fcd5ca9027f189f525cafe367209a400bc (patch)
treeb38f61bf3a70684380f400b95a9a55773502c466 /compiler/rustc_pattern_analysis/src/errors.rs
parentb66b4020d8a34f1ac4e8566c568cff515d850bb7 (diff)
parent351fe273547ac57ddf829b358dff538ab587599a (diff)
downloadrust-9f4039fcd5ca9027f189f525cafe367209a400bc.tar.gz
rust-9f4039fcd5ca9027f189f525cafe367209a400bc.zip
Rollup merge of #127415 - AljoschaMeyer:master, r=dtolnay
Add missing try_new_uninit_slice_in and try_new_zeroed_slice_in

The methods for fallible slice allocation in a given allocator were missing from `Box`, which was an oversight according to https://github.com/rust-lang/wg-allocators/issues/130

This PR adds them as `try_new_uninit_slice_in` and `try_new_zeroed_slice_in`. I simply copy-pasted the implementations of `try_new_uninit_slice` and `try_new_zeroed_slice` and adusted doc comment, typings, and the allocator it uses internally.

Also adds missing punctuation to the doc comments of `try_new_uninit_slice` and `try_new_zeroed_slice`.

Related issue is https://github.com/rust-lang/rust/issues/32838 (Allocator traits and std::heap) *I think*. Also relevant is https://github.com/rust-lang/rust/issues/63291, but I did not add the corresponding `#[unstable]` proc macro, since `try_new_uninit_slice` and `try_new_zeroed_slice` are also not annotated with it.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions