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 @@ -7729,11 +7729,12 @@ impl<'a> UnwrapAnonymousFunction<'a> {
7729
7729
for a in arguments {
7730
7730
match & a. names {
7731
7731
ArgNames :: Named { name, .. } => outer_argument_names. push ( name) ,
7732
- ArgNames :: NamedLabelled { name, .. } => outer_argument_names. push ( name) ,
7733
- // We can bail out early if any of these are discarded, since
7734
- // they couldn't match the arguments used.
7732
+ // We can bail out early if any arguments are discarded, since
7733
+ // they couldn't match those actually used.
7735
7734
ArgNames :: Discard { .. } => return ,
7736
- ArgNames :: LabelledDiscard { .. } => return ,
7735
+ // Anonymous functions can't have labelled arguments.
7736
+ ArgNames :: NamedLabelled { .. } => unreachable ! ( ) ,
7737
+ ArgNames :: LabelledDiscard { .. } => unreachable ! ( ) ,
7737
7738
}
7738
7739
}
7739
7740
You can’t perform that action at this time.
0 commit comments