use array_windows
instead of windows
in the compiler
This commit is contained in:
parent
255a4c58f5
commit
3435683fd5
11 changed files with 21 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
|||
//! Construction of MIR from HIR.
|
||||
//!
|
||||
//! This crate also contains the match exhaustiveness and usefulness checking.
|
||||
|
||||
#![feature(array_windows)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(const_fn)]
|
||||
|
|
|
@ -2299,8 +2299,8 @@ fn split_grouped_constructors<'p, 'tcx>(
|
|||
// interval into a constructor.
|
||||
split_ctors.extend(
|
||||
borders
|
||||
.windows(2)
|
||||
.filter_map(|window| match (window[0], window[1]) {
|
||||
.array_windows()
|
||||
.filter_map(|&[fst, snd]| match (fst, snd) {
|
||||
(Border::JustBefore(n), Border::JustBefore(m)) => {
|
||||
if n < m {
|
||||
Some(IntRange { range: n..=(m - 1), ty, span })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue