You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #106591 - Ezrashaw:attempted-integer-identifer, r=Estebank
suggestion for attempted integer identifier in patterns
Fixes#106552
Implemented a suggestion on `E0005` that occurs when no bindings are present and the pattern is a literal integer.
Copy file name to clipboardExpand all lines: compiler/rustc_error_messages/locales/en-US/mir_build.ftl
+2
Original file line number
Diff line number
Diff line change
@@ -364,3 +364,5 @@ mir_build_suggest_let_else = you might want to use `let else` to handle the {$co
364
364
[one] variant that isn't
365
365
*[other] variants that aren't
366
366
} matched
367
+
368
+
mir_build_suggest_attempted_int_lit = alternatively, you could prepend the pattern with an underscore to define a new named variable; identifiers cannot begin with digits
0 commit comments