Merge pull request #740 from RalfJung/stacked-borrows-2

hopefully improve error message a bit
This commit is contained in:
Ralf Jung 2019-05-23 12:37:55 +02:00 committed by GitHub
commit cf027587f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -383,7 +383,7 @@ impl<'tcx> Stack {
// We use that to determine where to put the new item.
let granting_idx = self.find_granting(access, derived_from)
.ok_or_else(|| InterpError::MachineError(format!(
"no item to reborrow for {:?} from tag {} found in borrow stack", new.perm, derived_from,
"trying to reborrow for {:?}, but parent tag {} does not have an appropriate item in the borrow stack", new.perm, derived_from,
)))?;
// Compute where to put the new item.