Skip to content

Commit

Permalink
Fix #52416 - ice for move errors in unsafe blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed Jul 21, 2018
1 parent 1241274 commit 086c2d0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/librustc_mir/borrow_check/move_errors.rs
Expand Up @@ -96,19 +96,19 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
.map(|stmt| &stmt.kind)
{
let local_decl = &self.mir.local_decls[*local];
// opt_match_place is the
// match_span is the span of the expression being matched on
// match *x.y { ... } match_place is Some(*x.y)
// ^^^^ match_span is the span of *x.y
//
// opt_match_place is None for let [mut] x = ... statements,
// whether or not the right-hand side is a place expression
if let Some(ClearCrossCrate::Set(BindingForm::Var(VarBindingForm {
opt_match_place: Some((ref opt_match_place, match_span)),
binding_mode: _,
opt_ty_info: _,
}))) = local_decl.is_user_variable
{
// opt_match_place is the
// match_span is the span of the expression being matched on
// match *x.y { ... } match_place is Some(*x.y)
// ^^^^ match_span is the span of *x.y
// opt_match_place is None for let [mut] x = ... statements,
// whether or not the right-hand side is a place expression

// HACK use scopes to determine if this assignment is
// the initialization of a variable.
// FIXME(matthewjasper) This would probably be more
Expand All @@ -127,8 +127,8 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
opt_match_place,
match_span,
);
return;
}
return;
}
}
grouped_errors.push(GroupedMoveError::OtherIllegalMove {
Expand Down

0 comments on commit 086c2d0

Please sign in to comment.