Skip to content

Commit 33d9d8e

Browse files
committed
Update nightly book
1 parent 7ce8191 commit 33d9d8e

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed
Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
1-
# `i128_type`
1+
# `i128`
22

33
The tracking issue for this feature is: [#35118]
44

55
[#35118]: https://github.com/rust-lang/rust/issues/35118
66

77
------------------------
88

9-
The `i128_type` feature adds support for 128 bit signed and unsigned integer
10-
types.
9+
The `i128` feature adds support for `#[repr(u128)]` on `enum`s.
1110

1211
```rust
13-
#![feature(i128_type)]
12+
#![feature(i128)]
1413

15-
fn main() {
16-
assert_eq!(1u128 + 1u128, 2u128);
17-
assert_eq!(u128::min_value(), 0);
18-
assert_eq!(u128::max_value(), 340282366920938463463374607431768211455);
19-
20-
assert_eq!(1i128 - 2i128, -1i128);
21-
assert_eq!(i128::min_value(), -170141183460469231731687303715884105728);
22-
assert_eq!(i128::max_value(), 170141183460469231731687303715884105727);
14+
#[repr(u128)]
15+
enum Foo {
16+
Bar(u64),
2317
}
2418
```
25-

0 commit comments

Comments
 (0)