@@ -485,8 +485,6 @@ type BindingMap = FxHashMap<Ident, BindingInfo>;
485
485
#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
486
486
enum PatternSource {
487
487
Match ,
488
- // FIXME(54883): Consider fusing with `Let` below once let-statements support or-patterns.
489
- LetExpr ,
490
488
Let ,
491
489
For ,
492
490
FnParam ,
@@ -496,7 +494,7 @@ impl PatternSource {
496
494
fn descr ( self ) -> & ' static str {
497
495
match self {
498
496
PatternSource :: Match => "match binding" ,
499
- PatternSource :: Let | PatternSource :: LetExpr => "let binding" ,
497
+ PatternSource :: Let => "let binding" ,
500
498
PatternSource :: For => "for binding" ,
501
499
PatternSource :: FnParam => "function parameter" ,
502
500
}
@@ -3153,7 +3151,7 @@ impl<'a> Resolver<'a> {
3153
3151
) ;
3154
3152
}
3155
3153
Some ( ..) if pat_src == PatternSource :: Match ||
3156
- pat_src == PatternSource :: LetExpr => {
3154
+ pat_src == PatternSource :: Let => {
3157
3155
// `Variant1(a) | Variant2(a)`, ok
3158
3156
// Reuse definition from the first `a`.
3159
3157
res = self . ribs [ ValueNS ] . last_mut ( ) . unwrap ( ) . bindings [ & ident] ;
@@ -4348,7 +4346,7 @@ impl<'a> Resolver<'a> {
4348
4346
4349
4347
ExprKind :: Let ( ref pats, ref scrutinee) => {
4350
4348
self . visit_expr ( scrutinee) ;
4351
- self . resolve_pats ( pats, PatternSource :: LetExpr ) ;
4349
+ self . resolve_pats ( pats, PatternSource :: Let ) ;
4352
4350
}
4353
4351
4354
4352
ExprKind :: If ( ref cond, ref then, ref opt_else) => {
0 commit comments