@@ -74,7 +74,7 @@ pub mod __impl {
74
74
/// use std::cell::RefCell;
75
75
/// use std::thread;
76
76
///
77
- /// thread_local!(static FOO: RefCell<uint > = RefCell::new(1));
77
+ /// thread_local!(static FOO: RefCell<u32 > = RefCell::new(1));
78
78
///
79
79
/// FOO.with(|f| {
80
80
/// assert_eq!(*f.borrow(), 1);
@@ -503,7 +503,7 @@ mod imp {
503
503
unsafe fn ptr ( & ' static self ) -> Option < * mut T > {
504
504
let ptr = self . os . get ( ) as * mut Value < T > ;
505
505
if !ptr. is_null ( ) {
506
- if ptr as uint == 1 {
506
+ if ptr as usize == 1 {
507
507
return None
508
508
}
509
509
return Some ( & mut ( * ptr) . value as * mut T ) ;
@@ -563,7 +563,7 @@ mod tests {
563
563
564
564
#[ test]
565
565
fn smoke_no_dtor ( ) {
566
- thread_local ! ( static FOO : UnsafeCell <int > = UnsafeCell { value: 1 } ) ;
566
+ thread_local ! ( static FOO : UnsafeCell <i32 > = UnsafeCell { value: 1 } ) ;
567
567
568
568
FOO . with ( |f| unsafe {
569
569
assert_eq ! ( * f. get( ) , 1 ) ;
@@ -632,7 +632,7 @@ mod tests {
632
632
thread_local ! ( static K2 : UnsafeCell <Option <S2 >> = UnsafeCell {
633
633
value: None
634
634
} ) ;
635
- static mut HITS : uint = 0 ;
635
+ static mut HITS : u32 = 0 ;
636
636
637
637
impl Drop for S1 {
638
638
fn drop ( & mut self ) {
@@ -723,8 +723,8 @@ mod dynamic_tests {
723
723
724
724
#[ test]
725
725
fn smoke ( ) {
726
- fn square ( i : int ) -> int { i * i }
727
- thread_local ! ( static FOO : int = square( 3 ) ) ;
726
+ fn square ( i : i32 ) -> i32 { i * i }
727
+ thread_local ! ( static FOO : i32 = square( 3 ) ) ;
728
728
729
729
FOO . with ( |f| {
730
730
assert_eq ! ( * f, 9 ) ;
@@ -733,12 +733,12 @@ mod dynamic_tests {
733
733
734
734
#[ test]
735
735
fn hashmap ( ) {
736
- fn map ( ) -> RefCell < HashMap < int , int > > {
736
+ fn map ( ) -> RefCell < HashMap < i32 , i32 > > {
737
737
let mut m = HashMap :: new ( ) ;
738
738
m. insert ( 1 , 2 ) ;
739
739
RefCell :: new ( m)
740
740
}
741
- thread_local ! ( static FOO : RefCell <HashMap <int , int >> = map( ) ) ;
741
+ thread_local ! ( static FOO : RefCell <HashMap <i32 , i32 >> = map( ) ) ;
742
742
743
743
FOO . with ( |map| {
744
744
assert_eq ! ( map. borrow( ) [ 1 ] , 2 ) ;
@@ -747,7 +747,7 @@ mod dynamic_tests {
747
747
748
748
#[ test]
749
749
fn refcell_vec ( ) {
750
- thread_local ! ( static FOO : RefCell <Vec <uint >> = RefCell :: new( vec![ 1 , 2 , 3 ] ) ) ;
750
+ thread_local ! ( static FOO : RefCell <Vec <u32 >> = RefCell :: new( vec![ 1 , 2 , 3 ] ) ) ;
751
751
752
752
FOO . with ( |vec| {
753
753
assert_eq ! ( vec. borrow( ) . len( ) , 3 ) ;
0 commit comments