File tree 7 files changed +13
-13
lines changed
7 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ use sync::{Mutex, RWLock};
47
47
use std:: cast;
48
48
use std:: sync:: arc:: UnsafeArc ;
49
49
use std:: task;
50
- use std:: borrow ;
50
+ use std:: reference ;
51
51
52
52
/// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
53
53
pub struct Condvar < ' a > {
@@ -465,7 +465,7 @@ impl<T:Freeze + Send> RWArc<T> {
465
465
// of this cast is removing the mutability.)
466
466
let new_data = data;
467
467
// Downgrade ensured the token belonged to us. Just a sanity check.
468
- assert ! ( borrow :: ref_eq( & ( * state) . data, new_data) ) ;
468
+ assert ! ( reference :: ref_eq( & ( * state) . data, new_data) ) ;
469
469
// Produce new token
470
470
RWReadMode {
471
471
data : new_data,
Original file line number Diff line number Diff line change 18
18
*/
19
19
20
20
21
- use std:: borrow ;
21
+ use std:: reference ;
22
22
use std:: comm;
23
23
use std:: unstable:: sync:: Exclusive ;
24
24
use std:: sync:: arc:: UnsafeArc ;
@@ -634,7 +634,7 @@ impl RWLock {
634
634
/// To be called inside of the write_downgrade block.
635
635
pub fn downgrade < ' a > ( & self , token : RWLockWriteMode < ' a > )
636
636
-> RWLockReadMode < ' a > {
637
- if !borrow :: ref_eq ( self , token. lock ) {
637
+ if !reference :: ref_eq ( self , token. lock ) {
638
638
fail ! ( "Can't downgrade() with a different rwlock's write_mode!" ) ;
639
639
}
640
640
unsafe {
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ pub mod send_str;
123
123
pub mod ptr;
124
124
pub mod owned;
125
125
pub mod managed;
126
- pub mod borrow ;
126
+ pub mod reference ;
127
127
pub mod rc;
128
128
pub mod gc;
129
129
File renamed without changes.
Original file line number Diff line number Diff line change 14
14
//! to implement this.
15
15
16
16
use any:: AnyOwnExt ;
17
- use borrow ;
17
+ use reference ;
18
18
use cast;
19
19
use cleanup;
20
20
use clone:: Clone ;
@@ -287,7 +287,7 @@ impl Task {
287
287
288
288
impl Drop for Task {
289
289
fn drop ( & mut self ) {
290
- rtdebug ! ( "called drop for a task: {}" , borrow :: to_uint( self ) ) ;
290
+ rtdebug ! ( "called drop for a task: {}" , reference :: to_uint( self ) ) ;
291
291
rtassert ! ( self . destroyed) ;
292
292
}
293
293
}
Original file line number Diff line number Diff line change 1
- // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
10
10
11
11
#[ feature( managed_boxes) ] ;
12
12
13
- use std:: borrow ;
13
+ use std:: reference ;
14
14
use std:: ptr;
15
15
16
16
fn borrow ( x : & int , f: |x: & int |) {
@@ -20,7 +20,7 @@ fn borrow(x: &int, f: |x: &int|) {
20
20
fn test1 ( x : @~int ) {
21
21
borrow ( & * ( * x) . clone ( ) , |p| {
22
22
let x_a = ptr:: to_unsafe_ptr ( & * * x) ;
23
- assert ! ( ( x_a as uint) != borrow :: to_uint( p) ) ;
23
+ assert ! ( ( x_a as uint) != reference :: to_uint( p) ) ;
24
24
assert_eq ! ( unsafe { * x_a} , * p) ;
25
25
} )
26
26
}
Original file line number Diff line number Diff line change 1
- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- use std:: borrow ;
11
+ use std:: reference ;
12
12
13
13
pub fn main ( ) {
14
14
let x = 3 ;
15
- info ! ( "&x={:x}" , borrow :: to_uint( & x) ) ;
15
+ info ! ( "&x={:x}" , reference :: to_uint( & x) ) ;
16
16
}
You can’t perform that action at this time.
0 commit comments