Mark an unreachable case as a bug instead of attempting to show an error to the user
This commit is contained in:
parent
2aab6af0fa
commit
4fba7d33d6
1 changed files with 1 additions and 1 deletions
|
|
@ -1853,7 +1853,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
|
|||
}
|
||||
}
|
||||
// promoteds may never be mutated
|
||||
Place::Promoted(_) => Err(place),
|
||||
Place::Promoted(_) => bug!("encountered mutable promoted"),
|
||||
Place::Static(ref static_) => {
|
||||
if self.tcx.is_static(static_.def_id) != Some(hir::Mutability::MutMutable) {
|
||||
Err(place)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue