Skip to content

Commit e881c42

Browse files
committed
Auto merge of #3834 - sun-jacobi:tb-comment, r=RalfJung
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`.
2 parents 8b10bda + e698ca1 commit e881c42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/miri/tests/pass/tree_borrows/tree-borrows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ fn not_unpin_not_protected() {
321321
pub struct NotUnpin(#[allow(dead_code)] i32, PhantomPinned);
322322

323323
fn inner(x: &mut NotUnpin, f: fn(&mut NotUnpin)) {
324-
// `f` may mutate, but it may not deallocate!
324+
// `f` is allowed to deallocate `x`.
325325
f(x)
326326
}
327327

0 commit comments

Comments
 (0)