Skip to content

Commit a14aafa

Browse files
author
mejrs
committed
Fix "mir_build_multiple_mut_borrows"
1 parent 09ea513 commit a14aafa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_mir_build/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ pub struct MultipleMutBorrows {
586586
pub span: Span,
587587
#[label]
588588
pub binding_span: Span,
589-
#[subdiagnostic]
589+
#[subdiagnostic(eager)]
590590
pub occurences: Vec<MultipleMutBorrowOccurence>,
591591
pub name: Ident,
592592
}

src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ LL | let ref mut a @ (
5353
| |
5454
LL | |
5555
LL | | ref mut b,
56-
| | --------- another mutable borrow, by `d`, occurs here
56+
| | --------- another mutable borrow, by `b`, occurs here
5757
LL | | [
5858
LL | | ref mut c,
59-
| | --------- another mutable borrow, by `d`, occurs here
59+
| | --------- another mutable borrow, by `c`, occurs here
6060
LL | | ref mut d,
6161
| | --------- another mutable borrow, by `d`, occurs here
6262
LL | | ref e,
@@ -75,10 +75,10 @@ LL | let ref mut a @ (
7575
| |
7676
LL | |
7777
LL | | ref mut b,
78-
| | --------- another mutable borrow, by `d`, occurs here
78+
| | --------- another mutable borrow, by `b`, occurs here
7979
LL | | [
8080
LL | | ref mut c,
81-
| | --------- another mutable borrow, by `d`, occurs here
81+
| | --------- another mutable borrow, by `c`, occurs here
8282
LL | | ref mut d,
8383
| | --------- another mutable borrow, by `d`, occurs here
8484
LL | | ref e,

0 commit comments

Comments
 (0)