Skip to content

Commit 99754ad

Browse files
committed
Some reformatting
1 parent bfc8ce3 commit 99754ad

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/librustc_mir/hair/pattern/_match.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
814814
// FIXME: this might lead to "unstable" behavior with macro hygiene
815815
// introducing uninhabited patterns for inaccessible fields. We
816816
// need to figure out how to model that.
817-
ty: rows.iter().map(|r| r[0].ty).find(|ty| !ty.references_error())
818-
.unwrap_or(v[0].ty),
817+
ty: rows.iter().map(|r| r[0].ty).find(|ty| !ty.references_error()).unwrap_or(v[0].ty),
819818
max_slice_length: max_slice_length(cx, rows.iter().map(|r| r[0]).chain(Some(v[0])))
820819
};
821820

@@ -1046,7 +1045,7 @@ fn is_useful_specialized<'p, 'a:'p, 'tcx: 'a>(
10461045
/// Slice patterns, however, can match slices of different lengths. For instance,
10471046
/// `[a, b, ..tail]` can match a slice of length 2, 3, 4 and so on.
10481047
///
1049-
/// Returns None in case of a catch-all, which can't be specialized.
1048+
/// Returns `None` in case of a catch-all, which can't be specialized.
10501049
fn pat_constructors<'tcx>(cx: &mut MatchCheckCtxt,
10511050
pat: &Pattern<'tcx>,
10521051
pcx: PatternContext)
@@ -1319,13 +1318,13 @@ fn specialize<'p, 'a: 'p, 'tcx: 'a>(
13191318
span_bug!(pat.span,
13201319
"unexpected const-val {:?} with ctor {:?}", value, constructor)
13211320
}
1322-
},
1321+
}
13231322
_ => {
13241323
match constructor_covered_by_range(
13251324
cx.tcx,
13261325
constructor, value, value, RangeEnd::Included,
13271326
value.ty,
1328-
) {
1327+
) {
13291328
Ok(true) => Some(vec![]),
13301329
Ok(false) => None,
13311330
Err(ErrorReported) => None,

src/librustc_mir/hair/pattern/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl<'a, 'tcx> MatchVisitor<'a, 'tcx> {
272272
self.tables);
273273
let pattern = patcx.lower_pattern(pat);
274274
let pattern_ty = pattern.ty;
275-
let pats : Matrix = vec![vec![
275+
let pats: Matrix = vec![vec![
276276
expand_pattern(cx, pattern)
277277
]].into_iter().collect();
278278

0 commit comments

Comments
 (0)