File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: 04e7bd675881bc091db2154e84caebb255b0ff8c
5
+ refs/heads/try: ae5ea85c361e2b383b01c1101d731843795ea0cb
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -3,13 +3,8 @@ export ptr_eq;
3
3
#[ doc(
4
4
brief = "Determine if two shared boxes point to the same object"
5
5
) ]
6
- pure fn ptr_eq < T > ( a : @T , b : @T ) -> bool {
7
- // FIXME: ptr::addr_of
8
- unsafe {
9
- let a_ptr: uint = unsafe :: reinterpret_cast ( a) ;
10
- let b_ptr: uint = unsafe :: reinterpret_cast ( b) ;
11
- ret a_ptr == b_ptr;
12
- }
6
+ pure fn ptr_eq < T > ( a : @T , b : @T ) -> bool unchecked {
7
+ ptr:: addr_of ( * a) == ptr:: addr_of ( * b)
13
8
}
14
9
15
10
#[ test]
You can’t perform that action at this time.
0 commit comments