Skip to content

Commit

Permalink
Auto merge of rust-lang#3834 - sun-jacobi:tb-comment, r=RalfJung
Browse files Browse the repository at this point in the history
Fix a misleading comment in `tests/pass/tree_borrows/tree-borrows.rs`

The original comment is somewhat misleading.

Since we don't add a protector for `x` here, `f` should be allowed to deallocate `x`.
  • Loading branch information
bors committed Aug 22, 2024
2 parents 8b10bda + e698ca1 commit e881c42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/miri/tests/pass/tree_borrows/tree-borrows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ fn not_unpin_not_protected() {
pub struct NotUnpin(#[allow(dead_code)] i32, PhantomPinned);

fn inner(x: &mut NotUnpin, f: fn(&mut NotUnpin)) {
// `f` may mutate, but it may not deallocate!
// `f` is allowed to deallocate `x`.
f(x)
}

Expand Down

0 comments on commit e881c42

Please sign in to comment.