]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
Rollup merge of #105505 - WaffleLapkin:yeet_unused_parens_lint, r=fee1-dead
[rust.git] / compiler / rustc_borrowck / src / diagnostics / mutability_errors.rs
index 0cf66e41001f84eff9a14acc0a0cb6cce9c0d47f..3319a80681fde277dc0fd3f361c2656adfafe6b6 100644 (file)
@@ -219,8 +219,8 @@ pub(crate) fn report_mutability_error(
             PlaceRef {
                 local,
                 projection:
-                    &[
-                        ref proj_base @ ..,
+                    [
+                        proj_base @ ..,
                         ProjectionElem::Deref,
                         ProjectionElem::Field(field, _),
                         ProjectionElem::Deref,
@@ -231,7 +231,7 @@ pub(crate) fn report_mutability_error(
                 if let Some(span) = get_mut_span_in_struct_field(
                     self.infcx.tcx,
                     Place::ty_from(local, proj_base, self.body, self.infcx.tcx).ty,
-                    field,
+                    *field,
                 ) {
                     err.span_suggestion_verbose(
                         span,