Remove seldom-used std::reference functions.
This commit is contained in:
parent
d547f7ac21
commit
f17d972014
7 changed files with 8 additions and 39 deletions
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#[feature(managed_boxes)];
|
||||
|
||||
use std::reference;
|
||||
use std::ptr;
|
||||
|
||||
fn borrow(x: &int, f: |x: &int|) {
|
||||
|
|
@ -20,7 +19,7 @@ fn borrow(x: &int, f: |x: &int|) {
|
|||
fn test1(x: @~int) {
|
||||
borrow(&*(*x).clone(), |p| {
|
||||
let x_a = ptr::to_unsafe_ptr(&**x);
|
||||
assert!((x_a as uint) != reference::to_uint(p));
|
||||
assert!((x_a as uint) != (p as *int as uint));
|
||||
assert_eq!(unsafe{*x_a}, *p);
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use std::reference;
|
||||
|
||||
pub fn main() {
|
||||
let x = 3;
|
||||
info!("&x={:x}", reference::to_uint(&x));
|
||||
info!("&x={:x}", (&x as *int as uint));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue