Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ed52c7b

Browse files
committed
Move deref-lval test
1 parent 949c966 commit ed52c7b

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

library/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+
}

src/test/ui/deref-lval.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)