rustc_borrowck: remove ref patterns

This commit is contained in:
Maybe Waffle
2022-12-02 19:07:57 +00:00
parent c5351ad4dc
commit c75817fb1b
13 changed files with 145 additions and 160 deletions

View File

@@ -219,8 +219,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
PlaceRef {
local,
projection:
&[
ref proj_base @ ..,
[
proj_base @ ..,
ProjectionElem::Deref,
ProjectionElem::Field(field, _),
ProjectionElem::Deref,
@@ -231,7 +231,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
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,