Skip to content

Commit 1b3c339

Browse files
committed
Update function name to reflect reality
1 parent b115968 commit 1b3c339

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_const_eval/_match.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ fn slice_pat_covered_by_constructor(_tcx: TyCtxt, _span: Span,
835835
Ok(true)
836836
}
837837

838-
fn range_covered_by_constructor(tcx: TyCtxt, span: Span,
838+
fn constructor_covered_by_range(tcx: TyCtxt, span: Span,
839839
ctor: &Constructor,
840840
from: &ConstVal, to: &ConstVal,
841841
end: RangeEnd)
@@ -933,7 +933,7 @@ fn specialize<'p, 'a: 'p, 'tcx: 'a>(
933933
"unexpected const-val {:?} with ctor {:?}", value, constructor)
934934
},
935935
_ => {
936-
match range_covered_by_constructor(
936+
match constructor_covered_by_range(
937937
cx.tcx, pat.span, constructor, value, value, RangeEnd::Included
938938
) {
939939
Ok(true) => Some(vec![]),
@@ -945,7 +945,7 @@ fn specialize<'p, 'a: 'p, 'tcx: 'a>(
945945
}
946946

947947
PatternKind::Range { ref lo, ref hi, ref end } => {
948-
match range_covered_by_constructor(
948+
match constructor_covered_by_range(
949949
cx.tcx, pat.span, constructor, lo, hi, end.clone()
950950
) {
951951
Ok(true) => Some(vec![]),

0 commit comments

Comments
 (0)