Skip to content

Commit 6686d10

Browse files
committed
tidy fix
1 parent e6938ee commit 6686d10

File tree

1 file changed

+1
-34
lines changed
  • src/librustc_mir/borrow_check

1 file changed

+1
-34
lines changed

src/librustc_mir/borrow_check/mod.rs

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,43 +1592,10 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
15921592
},
15931593
_ => {},
15941594
}
1595-
},
1595+
},
15961596
_ => {},
15971597
}
15981598

1599-
1600-
// match *place_err {
1601-
// Place::Projection(ref proj) => {
1602-
// match proj.elem {
1603-
// ProjectionElem::Deref => {
1604-
// match proj.base {
1605-
// Place::Local(local) => {
1606-
// let locations = self.mir.find_assignments(local);
1607-
// if locations.len() > 0 {
1608-
// let item_msg = if error_reported {
1609-
// match self.specialized_description(base){
1610-
// Some(msg) => msg,
1611-
// None => self.get_main_error_message(place)
1612-
// }
1613-
// } else {
1614-
// self.get_main_error_message(place)
1615-
// };
1616-
// err_info = Some((
1617-
// self.mir.source_info(locations[0]).span,
1618-
// "consider changing this to be a \
1619-
// mutable reference: `&mut`", item_msg,
1620-
// "cannot assign through `&`-reference"));
1621-
// }
1622-
// }
1623-
// _ => {},
1624-
// }
1625-
// }
1626-
// _ => {}
1627-
// }
1628-
// }
1629-
// _ => {}
1630-
// }
1631-
16321599
if let Some((err_help_span, err_help_stmt, item_msg, sec_span)) = err_info {
16331600
let mut err = self.tcx.cannot_assign(span, &item_msg, Origin::Mir, true);
16341601
err.span_suggestion(err_help_span, err_help_stmt, format!(""));

0 commit comments

Comments
 (0)