We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 949c966 commit ed52c7bCopy full SHA for ed52c7b
library/alloc/tests/boxed.rs
@@ -49,3 +49,12 @@ fn box_clone_from_ptr_stability() {
49
assert_eq!(copy.as_ptr() as usize, copy_raw);
50
}
51
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
+}
src/test/ui/deref-lval.rs
0 commit comments