@@ -163,7 +163,7 @@ use self::WitnessPreference::*;
163163use rustc_data_structures:: fx:: FxHashMap ;
164164use rustc_data_structures:: indexed_vec:: Idx ;
165165
166- use super :: { FieldPat , Pattern , PatKind , PatternRange } ;
166+ use super :: { FieldPat , Pattern , PatKind , PatRange } ;
167167use super :: { PatternFoldable , PatternFolder , compare_const_vals} ;
168168
169169use rustc:: hir:: def_id:: DefId ;
@@ -606,7 +606,7 @@ impl<'tcx> Witness<'tcx> {
606606 _ => {
607607 match * ctor {
608608 ConstantValue ( value) => PatKind :: Constant { value } ,
609- ConstantRange ( lo, hi, ty, end) => PatKind :: Range ( PatternRange {
609+ ConstantRange ( lo, hi, ty, end) => PatKind :: Range ( PatRange {
610610 lo : ty:: Const :: from_bits ( cx. tcx , lo, ty:: ParamEnv :: empty ( ) . and ( ty) ) ,
611611 hi : ty:: Const :: from_bits ( cx. tcx , hi, ty:: ParamEnv :: empty ( ) . and ( ty) ) ,
612612 end,
@@ -879,7 +879,7 @@ impl<'tcx> IntRange<'tcx> {
879879 let range = loop {
880880 match pat. kind {
881881 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 (
883883 lo. eval_bits ( tcx, param_env, lo. ty ) ,
884884 hi. eval_bits ( tcx, param_env, hi. ty ) ,
885885 lo. ty ,
@@ -1338,7 +1338,7 @@ fn pat_constructors<'tcx>(cx: &mut MatchCheckCtxt<'_, 'tcx>,
13381338 Some ( vec ! [ Variant ( adt_def. variants[ variant_index] . def_id) ] )
13391339 }
13401340 PatKind :: Constant { value } => Some ( vec ! [ ConstantValue ( value) ] ) ,
1341- PatKind :: Range ( PatternRange { lo, hi, end } ) =>
1341+ PatKind :: Range ( PatRange { lo, hi, end } ) =>
13421342 Some ( vec ! [ ConstantRange (
13431343 lo. eval_bits( cx. tcx, cx. param_env, lo. ty) ,
13441344 hi. eval_bits( cx. tcx, cx. param_env, hi. ty) ,
@@ -1658,7 +1658,7 @@ fn constructor_covered_by_range<'tcx>(
16581658) -> Result < bool , ErrorReported > {
16591659 let ( from, to, end, ty) = match pat. kind {
16601660 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 ) ,
16621662 _ => bug ! ( "`constructor_covered_by_range` called with {:?}" , pat) ,
16631663 } ;
16641664 trace ! ( "constructor_covered_by_range {:#?}, {:#?}, {:#?}, {}" , ctor, from, to, ty) ;
0 commit comments