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`.
This commit is contained in:
commit
e881c428f5
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue