@@ -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);
@@ -501,7 +501,7 @@ mod imp {
501
501
unsafe fn ptr ( & ' static self ) -> Option < * mut T > {
502
502
let ptr = self . os . get ( ) as * mut Value < T > ;
503
503
if !ptr. is_null ( ) {
504
- if ptr as uint == 1 {
504
+ if ptr as usize == 1 {
505
505
return None
506
506
}
507
507
return Some ( & mut ( * ptr) . value as * mut T ) ;
@@ -561,7 +561,7 @@ mod tests {
561
561
562
562
#[ test]
563
563
fn smoke_no_dtor ( ) {
564
- thread_local ! ( static FOO : UnsafeCell <int > = UnsafeCell { value: 1 } ) ;
564
+ thread_local ! ( static FOO : UnsafeCell <i32 > = UnsafeCell { value: 1 } ) ;
565
565
566
566
FOO . with ( |f| unsafe {
567
567
assert_eq ! ( * f. get( ) , 1 ) ;
@@ -630,7 +630,7 @@ mod tests {
630
630
thread_local ! ( static K2 : UnsafeCell <Option <S2 >> = UnsafeCell {
631
631
value: None
632
632
} ) ;
633
- static mut HITS : uint = 0 ;
633
+ static mut HITS : u32 = 0 ;
634
634
635
635
impl Drop for S1 {
636
636
fn drop ( & mut self ) {
@@ -721,8 +721,8 @@ mod dynamic_tests {
721
721
722
722
#[ test]
723
723
fn smoke ( ) {
724
- fn square ( i : int ) -> int { i * i }
725
- thread_local ! ( static FOO : int = square( 3 ) ) ;
724
+ fn square ( i : i32 ) -> i32 { i * i }
725
+ thread_local ! ( static FOO : i32 = square( 3 ) ) ;
726
726
727
727
FOO . with ( |f| {
728
728
assert_eq ! ( * f, 9 ) ;
@@ -731,12 +731,12 @@ mod dynamic_tests {
731
731
732
732
#[ test]
733
733
fn hashmap ( ) {
734
- fn map ( ) -> RefCell < HashMap < int , int > > {
734
+ fn map ( ) -> RefCell < HashMap < i32 , i32 > > {
735
735
let mut m = HashMap :: new ( ) ;
736
736
m. insert ( 1 , 2 ) ;
737
737
RefCell :: new ( m)
738
738
}
739
- thread_local ! ( static FOO : RefCell <HashMap <int , int >> = map( ) ) ;
739
+ thread_local ! ( static FOO : RefCell <HashMap <i32 , i32 >> = map( ) ) ;
740
740
741
741
FOO . with ( |map| {
742
742
assert_eq ! ( map. borrow( ) [ 1 ] , 2 ) ;
@@ -745,7 +745,7 @@ mod dynamic_tests {
745
745
746
746
#[ test]
747
747
fn refcell_vec ( ) {
748
- thread_local ! ( static FOO : RefCell <Vec <uint >> = RefCell :: new( vec![ 1 , 2 , 3 ] ) ) ;
748
+ thread_local ! ( static FOO : RefCell <Vec <u32 >> = RefCell :: new( vec![ 1 , 2 , 3 ] ) ) ;
749
749
750
750
FOO . with ( |vec| {
751
751
assert_eq ! ( vec. borrow( ) . len( ) , 3 ) ;
0 commit comments