File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
compiler-core/src/language_server Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -8426,11 +8426,12 @@ impl<'a> UnwrapAnonymousFunction<'a> {
8426
8426
for a in arguments {
8427
8427
match & a. names {
8428
8428
ArgNames :: Named { name, .. } => outer_argument_names. push ( name) ,
8429
- ArgNames :: NamedLabelled { name, .. } => outer_argument_names. push ( name) ,
8430
- // We can bail out early if any of these are discarded, since
8431
- // they couldn't match the arguments used.
8429
+ // We can bail out early if any arguments are discarded, since
8430
+ // they couldn't match those actually used.
8432
8431
ArgNames :: Discard { .. } => return ,
8433
- ArgNames :: LabelledDiscard { .. } => return ,
8432
+ // Anonymous functions can't have labelled arguments.
8433
+ ArgNames :: NamedLabelled { .. } => unreachable ! ( ) ,
8434
+ ArgNames :: LabelledDiscard { .. } => unreachable ! ( ) ,
8434
8435
}
8435
8436
}
8436
8437
You can’t perform that action at this time.
0 commit comments