@@ -313,10 +313,11 @@ impl PatternFolder<'tcx> for LiteralExpander<'tcx> {
313313 (
314314 & ty:: Ref ( _, rty, _) ,
315315 & PatKind :: Constant {
316- value : Const {
317- val : ty:: ConstKind :: Value ( val) ,
318- ty : ty:: TyS { kind : ty:: Ref ( _, crty, _) , .. }
319- } ,
316+ value :
317+ Const {
318+ val : ty:: ConstKind :: Value ( val) ,
319+ ty : ty:: TyS { kind : ty:: Ref ( _, crty, _) , .. } ,
320+ } ,
320321 } ,
321322 ) => Pat {
322323 ty : pat. ty ,
@@ -328,7 +329,7 @@ impl PatternFolder<'tcx> for LiteralExpander<'tcx> {
328329 kind : box PatKind :: Constant {
329330 value : self . tcx . mk_const ( Const {
330331 val : ty:: ConstKind :: Value (
331- self . fold_const_value_deref ( * val, rty, crty)
332+ self . fold_const_value_deref ( * val, rty, crty) ,
332333 ) ,
333334 ty : rty,
334335 } ) ,
@@ -1314,9 +1315,9 @@ impl<'tcx> IntRange<'tcx> {
13141315 ) -> Option < IntRange < ' tcx > > {
13151316 if let Some ( ( target_size, bias) ) = Self :: integral_size_and_signed_bias ( tcx, value. ty ) {
13161317 let ty = value. ty ;
1317- let val = if let ty:: ConstKind :: Value ( ConstValue :: Scalar (
1318- Scalar :: Raw { data , size }
1319- ) ) = value . val {
1318+ let val = if let ty:: ConstKind :: Value ( ConstValue :: Scalar ( Scalar :: Raw { data , size } ) ) =
1319+ value . val
1320+ {
13201321 // For this specific pattern we can skip a lot of effort and go
13211322 // straight to the result, after doing a bit of checking. (We
13221323 // could remove this branch and just use the next branch, which
@@ -2069,10 +2070,10 @@ fn split_grouped_constructors<'p, 'tcx>(
20692070 max_fixed_len =
20702071 cmp:: max ( max_fixed_len, n. eval_usize ( tcx, param_env) )
20712072 }
2072- ( ty :: ConstKind :: Value ( ConstValue :: Slice { start , end , .. } ) ,
2073- ty:: Slice ( _ ) ) => {
2074- max_fixed_len = cmp :: max ( max_fixed_len , ( end - start ) as u64 )
2075- }
2073+ (
2074+ ty:: ConstKind :: Value ( ConstValue :: Slice { start , end , .. } ) ,
2075+ ty :: Slice ( _ ) ,
2076+ ) => max_fixed_len = cmp :: max ( max_fixed_len , ( end - start ) as u64 ) ,
20762077 _ => { }
20772078 }
20782079 }
0 commit comments