File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
src/doc/unstable-book/src/language-features Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
- # ` i128_type `
1
+ # ` i128 `
2
2
3
3
The tracking issue for this feature is: [ #35118 ]
4
4
5
5
[ #35118 ] : https://github.com/rust-lang/rust/issues/35118
6
6
7
7
------------------------
8
8
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.
11
10
12
11
``` rust
13
- #![feature(i128_type )]
12
+ #![feature(i128 )]
14
13
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 ),
23
17
}
24
18
```
25
-
You can’t perform that action at this time.
0 commit comments