@@ -313,10 +313,11 @@ impl PatternFolder<'tcx> for LiteralExpander<'tcx> {
313
313
(
314
314
& ty:: Ref ( _, rty, _) ,
315
315
& 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
+ } ,
320
321
} ,
321
322
) => Pat {
322
323
ty : pat. ty ,
@@ -328,7 +329,7 @@ impl PatternFolder<'tcx> for LiteralExpander<'tcx> {
328
329
kind : box PatKind :: Constant {
329
330
value : self . tcx . mk_const ( Const {
330
331
val : ty:: ConstKind :: Value (
331
- self . fold_const_value_deref ( * val, rty, crty)
332
+ self . fold_const_value_deref ( * val, rty, crty) ,
332
333
) ,
333
334
ty : rty,
334
335
} ) ,
@@ -1314,9 +1315,9 @@ impl<'tcx> IntRange<'tcx> {
1314
1315
) -> Option < IntRange < ' tcx > > {
1315
1316
if let Some ( ( target_size, bias) ) = Self :: integral_size_and_signed_bias ( tcx, value. ty ) {
1316
1317
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
+ {
1320
1321
// For this specific pattern we can skip a lot of effort and go
1321
1322
// straight to the result, after doing a bit of checking. (We
1322
1323
// could remove this branch and just use the next branch, which
@@ -2069,10 +2070,10 @@ fn split_grouped_constructors<'p, 'tcx>(
2069
2070
max_fixed_len =
2070
2071
cmp:: max ( max_fixed_len, n. eval_usize ( tcx, param_env) )
2071
2072
}
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 ) ,
2076
2077
_ => { }
2077
2078
}
2078
2079
}
0 commit comments