]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/enum_clike_unportable_variant.txt
Rollup merge of #101389 - lukaslueg:rcgetmutdocs, r=m-ou-se
[rust.git] / src / tools / clippy / src / docs / enum_clike_unportable_variant.txt
1 ### What it does
2 Checks for C-like enumerations that are
3 `repr(isize/usize)` and have values that don't fit into an `i32`.
4
5 ### Why is this bad?
6 This will truncate the variant value on 32 bit
7 architectures, but works fine on 64 bit.
8
9 ### Example
10 ```
11 #[repr(usize)]
12 enum NonPortable {
13     X = 0x1_0000_0000,
14     Y = 0,
15 }
16 ```