Remove seldom-used std::reference functions.

This commit is contained in:
xales 2014-01-28 21:05:57 -05:00
parent d547f7ac21
commit f17d972014
7 changed files with 8 additions and 39 deletions

View file

@ -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);
})
}

View file

@ -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));
}