@@ -163,7 +163,7 @@ use self::WitnessPreference::*;
163
163
use rustc_data_structures:: fx:: FxHashMap ;
164
164
use rustc_data_structures:: indexed_vec:: Idx ;
165
165
166
- use super :: { FieldPat , Pattern , PatKind , PatternRange } ;
166
+ use super :: { FieldPat , Pattern , PatKind , PatRange } ;
167
167
use super :: { PatternFoldable , PatternFolder , compare_const_vals} ;
168
168
169
169
use rustc:: hir:: def_id:: DefId ;
@@ -606,7 +606,7 @@ impl<'tcx> Witness<'tcx> {
606
606
_ => {
607
607
match * ctor {
608
608
ConstantValue ( value) => PatKind :: Constant { value } ,
609
- ConstantRange ( lo, hi, ty, end) => PatKind :: Range ( PatternRange {
609
+ ConstantRange ( lo, hi, ty, end) => PatKind :: Range ( PatRange {
610
610
lo : ty:: Const :: from_bits ( cx. tcx , lo, ty:: ParamEnv :: empty ( ) . and ( ty) ) ,
611
611
hi : ty:: Const :: from_bits ( cx. tcx , hi, ty:: ParamEnv :: empty ( ) . and ( ty) ) ,
612
612
end,
@@ -879,7 +879,7 @@ impl<'tcx> IntRange<'tcx> {
879
879
let range = loop {
880
880
match pat. kind {
881
881
box PatKind :: Constant { value } => break ConstantValue ( value) ,
882
- box PatKind :: Range ( PatternRange { lo, hi, end } ) => break ConstantRange (
882
+ box PatKind :: Range ( PatRange { lo, hi, end } ) => break ConstantRange (
883
883
lo. eval_bits ( tcx, param_env, lo. ty ) ,
884
884
hi. eval_bits ( tcx, param_env, hi. ty ) ,
885
885
lo. ty ,
@@ -1338,7 +1338,7 @@ fn pat_constructors<'tcx>(cx: &mut MatchCheckCtxt<'_, 'tcx>,
1338
1338
Some ( vec ! [ Variant ( adt_def. variants[ variant_index] . def_id) ] )
1339
1339
}
1340
1340
PatKind :: Constant { value } => Some ( vec ! [ ConstantValue ( value) ] ) ,
1341
- PatKind :: Range ( PatternRange { lo, hi, end } ) =>
1341
+ PatKind :: Range ( PatRange { lo, hi, end } ) =>
1342
1342
Some ( vec ! [ ConstantRange (
1343
1343
lo. eval_bits( cx. tcx, cx. param_env, lo. ty) ,
1344
1344
hi. eval_bits( cx. tcx, cx. param_env, hi. ty) ,
@@ -1658,7 +1658,7 @@ fn constructor_covered_by_range<'tcx>(
1658
1658
) -> Result < bool , ErrorReported > {
1659
1659
let ( from, to, end, ty) = match pat. kind {
1660
1660
box PatKind :: Constant { value } => ( value, value, RangeEnd :: Included , value. ty ) ,
1661
- box PatKind :: Range ( PatternRange { lo, hi, end } ) => ( lo, hi, end, lo. ty ) ,
1661
+ box PatKind :: Range ( PatRange { lo, hi, end } ) => ( lo, hi, end, lo. ty ) ,
1662
1662
_ => bug ! ( "`constructor_covered_by_range` called with {:?}" , pat) ,
1663
1663
} ;
1664
1664
trace ! ( "constructor_covered_by_range {:#?}, {:#?}, {:#?}, {}" , ctor, from, to, ty) ;
0 commit comments