We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f5a42b commit 380b222Copy full SHA for 380b222
compiler/rustc_ast_lowering/src/item.rs
@@ -1096,9 +1096,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
1096
// Check if this is a binding pattern, if so, we can optimize and avoid adding a
1097
// `let <pat> = __argN;` statement. In this case, we do not rename the parameter.
1098
let (ident, is_simple_parameter) = match parameter.pat.kind {
1099
- hir::PatKind::Binding(hir::BindingAnnotation::Unannotated, _, ident, _) => {
1100
- (ident, true)
1101
- }
+ hir::PatKind::Binding(
+ hir::BindingAnnotation::Unannotated | hir::BindingAnnotation::Mutable,
+ _,
1102
+ ident,
1103
1104
+ ) => (ident, true),
1105
_ => {
1106
// Replace the ident for bindings that aren't simple.
1107
let name = format!("__arg{}", index);
0 commit comments