rust/library/alloc/src
Matthias Krüger f4297b06e8
Rollup merge of #98125 - KarlWithK:entry_add_modify_doc, r=Dylan-DPC
Entry and_modify doc

This PR modifies the documentation for [HashMap](https://doc.rust-lang.org/std/collections/struct.HashMap.html#) and [BTreeMap](https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#) by introducing examples for `and_modify`. `and_modify` is a function that tends to give more idiomatic rust code when dealing with these data structures -- yet it lacked examples and was hidden away. This PR adds that and addresses #98122.

I've made some choices which I tried to explain in my commits. This is my first time contributing to rust, so hopefully, I made the right choices.
2022-06-16 09:10:21 +02:00
..
alloc Use Box::new() instead of box syntax in alloc tests 2022-05-29 00:41:14 +02:00
boxed Use pointer::is_aligned in ThinBox debug assert 2022-05-27 22:19:43 -07:00
collections Rollup merge of #98125 - KarlWithK:entry_add_modify_doc, r=Dylan-DPC 2022-06-16 09:10:21 +02:00
ffi Finish bumping stage0 2022-05-27 07:36:17 -04:00
raw_vec Add a unit test for zero-sized types in RawVec. 2021-11-26 19:30:45 +11:00
rc Use Box::new() instead of box syntax in alloc tests 2022-05-29 00:41:14 +02:00
sync Use Box::new() instead of box syntax in alloc tests 2022-05-29 00:41:14 +02:00
vec Auto merge of #97293 - est31:remove_box, r=oli-obk 2022-06-02 13:20:19 +00:00
alloc.rs Auto merge of #97033 - nbdd0121:unwind3, r=Amanieu 2022-05-19 04:04:40 +00:00
borrow.rs Stabilize toowned_clone_into 2022-05-28 01:07:45 +09:00
boxed.rs Rollup merge of #97655 - steffahn:better-pin-box-construction-docs, r=thomcc 2022-06-02 23:39:07 +02:00
fmt.rs remove useless cold 2022-05-29 20:40:56 +01:00
lib.rs Auto merge of #95565 - jackh726:remove-borrowck-mode, r=nikomatsakis 2022-06-07 05:04:14 +00:00
macros.rs Use #[rustc_box] in alloc instead of box syntax 2022-06-01 02:28:34 +02:00
raw_vec.rs Remove some unnecessary rustc_allow_const_fn_unstable attributes. 2022-05-13 16:01:18 +10:00
rc.rs Use Box::new() instead of box syntax in alloc tests 2022-05-29 00:41:14 +02:00
slice.rs Add reexport of slice::from{,_mut}_ptr_range to alloc & std 2022-05-30 15:44:56 +04:00
str.rs additional docs example for replace **all** of str 2022-06-10 00:28:46 +08:00
string.rs Auto merge of #96605 - Urgau:string-retain-codegen, r=thomcc 2022-05-21 01:56:51 +00:00
sync.rs Update sync.rs 2022-06-01 14:12:36 +02:00
task.rs Document From implementations for Waker and RawWaker 2021-04-22 14:16:33 -07:00
tests.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00