@@ -1487,13 +1487,13 @@ impl ExprCollector<'_> {
1487
1487
ast:: Expr :: UnderscoreExpr ( _) => self . alloc_pat_from_expr ( Pat :: Wild , syntax_ptr) ,
1488
1488
ast:: Expr :: ParenExpr ( e) => {
1489
1489
// We special-case `(..)` for consistency with patterns.
1490
- if let Some ( ast:: Expr :: RangeExpr ( range) ) = e. expr ( ) {
1491
- if range. is_range_full ( ) {
1492
- return Some ( self . alloc_pat_from_expr (
1493
- Pat :: Tuple { args : Box :: default ( ) , ellipsis : Some ( 0 ) } ,
1494
- syntax_ptr ,
1495
- ) ) ;
1496
- }
1490
+ if let Some ( ast:: Expr :: RangeExpr ( range) ) = e. expr ( )
1491
+ && range. is_range_full ( )
1492
+ {
1493
+ return Some ( self . alloc_pat_from_expr (
1494
+ Pat :: Tuple { args : Box :: default ( ) , ellipsis : Some ( 0 ) } ,
1495
+ syntax_ptr ,
1496
+ ) ) ;
1497
1497
}
1498
1498
return e. expr ( ) . and_then ( |expr| self . maybe_collect_expr_as_pat ( & expr) ) ;
1499
1499
}
@@ -2569,19 +2569,18 @@ impl ExprCollector<'_> {
2569
2569
}
2570
2570
}
2571
2571
RibKind :: MacroDef ( macro_id) => {
2572
- if let Some ( ( parent_ctx, label_macro_id) ) = hygiene_info {
2573
- if label_macro_id == * * macro_id {
2574
- // A macro is allowed to refer to labels from before its declaration.
2575
- // Therefore, if we got to the rib of its declaration, give up its hygiene
2576
- // and use its parent expansion.
2577
-
2578
- hygiene_id =
2579
- HygieneId :: new ( parent_ctx. opaque_and_semitransparent ( self . db ) ) ;
2580
- hygiene_info = parent_ctx. outer_expn ( self . db ) . map ( |expansion| {
2581
- let expansion = self . db . lookup_intern_macro_call ( expansion. into ( ) ) ;
2582
- ( parent_ctx. parent ( self . db ) , expansion. def )
2583
- } ) ;
2584
- }
2572
+ if let Some ( ( parent_ctx, label_macro_id) ) = hygiene_info
2573
+ && label_macro_id == * * macro_id
2574
+ {
2575
+ // A macro is allowed to refer to labels from before its declaration.
2576
+ // Therefore, if we got to the rib of its declaration, give up its hygiene
2577
+ // and use its parent expansion.
2578
+
2579
+ hygiene_id = HygieneId :: new ( parent_ctx. opaque_and_semitransparent ( self . db ) ) ;
2580
+ hygiene_info = parent_ctx. outer_expn ( self . db ) . map ( |expansion| {
2581
+ let expansion = self . db . lookup_intern_macro_call ( expansion. into ( ) ) ;
2582
+ ( parent_ctx. parent ( self . db ) , expansion. def )
2583
+ } ) ;
2585
2584
}
2586
2585
}
2587
2586
_ => { }
0 commit comments