@@ -485,7 +485,7 @@ Examples of integer literals of various forms:
485
485
```
486
486
123is; // type isize
487
487
123us; // type usize
488
- 123_us // type usize
488
+ 123_us; // type usize
489
489
0xff_u8; // type u8
490
490
0o70_i16; // type i16
491
491
0b1111_1111_1001_0000_i32; // type i32
@@ -1500,11 +1500,11 @@ Constants should in general be preferred over statics, unless large amounts of
1500
1500
data are being stored, or single-address and mutability properties are required.
1501
1501
1502
1502
```
1503
- use std::sync::atomic::{AtomicUint , Ordering, ATOMIC_USIZE_INIT}; ;
1503
+ use std::sync::atomic::{AtomicUsize , Ordering, ATOMIC_USIZE_INIT};
1504
1504
1505
1505
// Note that ATOMIC_USIZE_INIT is a *const*, but it may be used to initialize a
1506
1506
// 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;
1508
1508
1509
1509
// This table is a candidate to be placed in read-only memory.
1510
1510
static TABLE: &'static [usize] = &[1, 2, 3, /* ... */];
@@ -3437,8 +3437,8 @@ fn is_symmetric(list: &[u32]) -> bool {
3437
3437
}
3438
3438
3439
3439
fn 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];
3442
3442
assert!(is_symmetric(sym));
3443
3443
assert!(!is_symmetric(not_sym));
3444
3444
}
0 commit comments