@@ -485,7 +485,7 @@ Examples of integer literals of various forms:
485485```
486486123is; // type isize
487487123us; // type usize
488- 123_us // type usize
488+ 123_us; // type usize
4894890xff_u8; // type u8
4904900o70_i16; // type i16
4914910b1111_1111_1001_0000_i32; // type i32
@@ -1500,11 +1500,11 @@ Constants should in general be preferred over statics, unless large amounts of
15001500data are being stored, or single-address and mutability properties are required.
15011501
15021502```
1503- use std::sync::atomic::{AtomicUint , Ordering, ATOMIC_USIZE_INIT}; ;
1503+ use std::sync::atomic::{AtomicUsize , Ordering, ATOMIC_USIZE_INIT};
15041504
15051505// Note that ATOMIC_USIZE_INIT is a *const*, but it may be used to initialize a
15061506// static. This static can be modified, so it is not placed in read-only memory.
1507- static COUNTER: AtomicUint = ATOMIC_USIZE_INIT;
1507+ static COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
15081508
15091509// This table is a candidate to be placed in read-only memory.
15101510static TABLE: &'static [usize] = &[1, 2, 3, /* ... */];
@@ -3437,8 +3437,8 @@ fn is_symmetric(list: &[u32]) -> bool {
34373437}
34383438
34393439fn main() {
3440- let sym = &[0us , 1, 4, 2, 4, 1, 0];
3441- let not_sym = &[0us , 1, 7, 2, 4, 1, 0];
3440+ let sym = &[0 , 1, 4, 2, 4, 1, 0];
3441+ let not_sym = &[0 , 1, 7, 2, 4, 1, 0];
34423442 assert!(is_symmetric(sym));
34433443 assert!(!is_symmetric(not_sym));
34443444}
0 commit comments