diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-17 03:05:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-17 03:05:19 +0200 |
| commit | 28964b4ef2f165fdc667367bd9ba6b8d4cf81d34 (patch) | |
| tree | 42e3f3a3456786349d5ca1fbeff0a34221e2ad6a /src/liballoc | |
| parent | b2e4d4836f7890fc069d5c62086e1015b9d94ff2 (diff) | |
| parent | 2edd123a233fff2fbccd17299e0c14d2203e1acc (diff) | |
| download | rust-28964b4ef2f165fdc667367bd9ba6b8d4cf81d34.tar.gz rust-28964b4ef2f165fdc667367bd9ba6b8d4cf81d34.zip | |
Rollup merge of #71220 - cuviper:std_or_patterns, r=Mark-Simulacrum
Dogfood or_patterns in the standard library We can start using `or_patterns` in the standard library as a step toward stabilization. cc #54883 @Centril
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/btree/map.rs | 7 | ||||
| -rw-r--r-- | src/liballoc/lib.rs | 1 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index 3fc1b5e16b3..38196b2d4b4 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -2058,12 +2058,7 @@ where (Excluded(s), Excluded(e)) if s == e => { panic!("range start and end are equal and excluded in BTreeMap") } - (Included(s), Included(e)) - | (Included(s), Excluded(e)) - | (Excluded(s), Included(e)) - | (Excluded(s), Excluded(e)) - if s > e => - { + (Included(s) | Excluded(s), Included(e) | Excluded(e)) if s > e => { panic!("range start is greater than range end in BTreeMap") } _ => {} diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 121c1cde548..a2071844d5d 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -103,6 +103,7 @@ #![feature(new_uninit)] #![feature(nll)] #![feature(optin_builtin_traits)] +#![feature(or_patterns)] #![feature(pattern)] #![feature(ptr_internals)] #![feature(ptr_offset_from)] |
