Skip to content

Commit

Permalink
Rollup merge of rust-lang#64503 - RalfJung:miri-retag, r=oli-obk
Browse files Browse the repository at this point in the history
rename Allocation::retag -> with_tags_and_extra

This is more consistent with `Pointer::with_tag`. Also, "retag" is a [term from Stacked Borrows](https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md#retagging) with a [corresponding Machine hook](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/interpret/machine/trait.Machine.html#method.retag), and this function has nothing to do with that other use of the term.

r? @oli-obk
  • Loading branch information
tmandry authored Sep 18, 2019
2 parents a8aa511 + 686170e commit dbce655
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/librustc/mir/interpret/allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ impl<Tag> Allocation<Tag> {
}
}

impl Allocation<()> {
impl Allocation<(), ()> {
/// Add Tag and Extra fields
pub fn retag<T, E>(
pub fn with_tags_and_extra<T, E>(
self,
mut tagger: impl FnMut(AllocId) -> T,
extra: E,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri
Submodule miri updated 1 files
+1 −1 src/machine.rs

0 comments on commit dbce655

Please sign in to comment.