diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-09-01 09:23:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-01 09:23:23 +0200 |
| commit | 5878780e641239906a7a2986ccae048f7640be87 (patch) | |
| tree | bc70bff308a0253fde7e2c588df60ac28f262008 /src/test/rustdoc-ui/coverage/enum-tuple.rs | |
| parent | dcefd6871d40612e924bb63f5d8a3bddf934c0f4 (diff) | |
| parent | f33f266a8a20594736b8eb7c95a4d42478bec7cb (diff) | |
| download | rust-5878780e641239906a7a2986ccae048f7640be87.tar.gz rust-5878780e641239906a7a2986ccae048f7640be87.zip | |
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`
Diffstat (limited to 'src/test/rustdoc-ui/coverage/enum-tuple.rs')
0 files changed, 0 insertions, 0 deletions
