Skip to content

Commit 8014c84

Browse files
Hmm having trouble finding the bisect, but this at least would work
1 parent 14f6e56 commit 8014c84

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
682682
for init_idx in inits {
683683
let init = &self.move_data.inits[*init_idx];
684684
let span = init.span(self.body);
685-
if !span.is_dummy() {
685+
if !span.is_dummy() && !spans.contains(&span) {
686686
spans.push(span);
687687
}
688688
}
@@ -779,7 +779,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
779779
}
780780
}
781781
if !shown {
782-
spans.dedup();
783782
for sp in &spans {
784783
if *sp < span && !sp.overlaps(span) {
785784
err.span_label(*sp, "binding initialized here in some conditions");

0 commit comments

Comments
 (0)