Skip to content

Commit 09e1d33

Browse files
committed
Move deref-lval test
1 parent 9b0688a commit 09e1d33

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

alloc/tests/boxed.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,12 @@ fn box_clone_from_ptr_stability() {
4949
assert_eq!(copy.as_ptr() as usize, copy_raw);
5050
}
5151
}
52+
53+
#[test]
54+
fn box_deref_lval() {
55+
use std::cell::Cell;
56+
57+
let x = Box::new(Cell::new(5));
58+
x.set(1000);
59+
assert_eq!(x.get(), 1000);
60+
}

0 commit comments

Comments
 (0)