rust/library/alloc/src
Mara Bos 5878780e64
Rollup merge of #88040 - nbdd0121:btreemap, r=m-ou-se
BTree: remove Ord bound from new

`K: Ord` bound is unnecessary on `BTree{Map,Set}::new` and their `Default` impl. No elements exist so there are nothing to compare anyway, so I don't think "future proof" would be a blocker here. This is analogous to `HashMap::new` not having a `K: Eq + Hash` bound.

#79245 originally does this and for some reason drops the change to `new` and `Default`. I can see why changes to other methods like `entry` or `symmetric_difference` need to be careful but I couldn't find out any reason not to do it on `new`.

Removing the bound also makes the stabilisation of `const fn new` not depending on const trait bounds.

cc `@steffahn` who suggests me to make this PR.

r? `@dtolnay`
2021-09-01 09:23:23 +02:00
..
alloc Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
collections Rollup merge of #88040 - nbdd0121:btreemap, r=m-ou-se 2021-09-01 09:23:23 +02:00
prelude mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw_vec Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
rc Re-stabilize Weak::as_ptr &friends for unsized T 2021-01-06 19:30:22 -05:00
sync Rollup merge of #80764 - CAD97:weak-unsized-as-ptr-again, r=RalfJung 2021-01-16 17:29:56 +00:00
vec Constified Default implementations 2021-08-17 07:15:54 +00:00
alloc.rs Fix typos “a”→“an” 2021-08-22 15:35:11 +02:00
borrow.rs Added diagnostic items to structs and traits for Clippy 2021-07-15 23:57:02 +02:00
boxed.rs add Box::try_new_uninit_slice for symmetry 2021-08-05 21:21:52 +02:00
fmt.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
lib.rs Constified Default implementations 2021-08-17 07:15:54 +00:00
macros.rs Remove alloc/malloc/calloc/realloc doc aliases 2021-06-30 19:59:39 +01:00
raw_vec.rs Hide allocator details from TryReserveError 2021-07-24 22:25:08 +01:00
rc.rs Rollup merge of #88226 - steffahn:an_rc, r=michaelwoerister 2021-08-25 15:48:53 +02:00
slice.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
str.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
string.rs Constified Default implementations 2021-08-17 07:15:54 +00:00
sync.rs Make explanations of cross-references between make_mut and get_mut more accurate 2021-08-24 21:34:12 +02:00
task.rs Document From implementations for Waker and RawWaker 2021-04-22 14:16:33 -07:00
tests.rs Fix alloc::test::test_show 2021-04-21 15:45:41 +02:00