Files
rust/library/coretests/tests
Jacob Pratt 80db7158af Rollup merge of #151235 - type-info-rename-bits, r=oli-obk
Change field `bit_width: usize` to `bits: u32` in type info

Follow-up https://github.com/rust-lang/rust/pull/151123#discussion_r2698418929. Quotes:

@Skgland:
> > I'm not sure whether we should use `usize` or `u64` here to represent the bit width.
>
> My expectation would be `u32` matching the associated `{u,i}N::BITS`[^1][^2][^3] constant that already exists on the integer types.
>
> [^1]: https://doc.rust-lang.org/std/primitive.i8.html#associatedconstant.BITS
> [^2]: https://doc.rust-lang.org/std/primitive.i128.html#associatedconstant.BITS
> [^3]: https://doc.rust-lang.org/std/primitive.usize.html#associatedconstant.BITS

@SpriteOvO:
> I found some [previous discussions](https://github.com/rust-lang/rust/pull/76492#issuecomment-700516940) regarding the type of `::BITS` constant. And during the stabilization of `::BITS`, the choice of `u32` affected some ecosystem crates (#81654), but soon after, these crates all accepted the `u32` type.
>
> So I think it makes sense to keep the type consistent with `::BITS` here. Then I'd also like to change the name from `bit_width` to `bits`, also for consistency.

r? @oli-obk
2026-01-18 03:16:46 -05:00
..
2025-06-12 12:53:14 -04:00
2025-12-22 21:37:18 -05:00
2025-09-12 13:54:15 -05:00
2025-08-02 17:34:59 -04:00
2026-01-11 16:39:18 +03:00
2025-07-09 16:37:11 +00:00
2025-11-27 20:18:13 +07:00
2025-09-16 10:05:40 -05:00
2025-09-16 10:26:52 -05:00
2025-01-26 10:45:09 +00:00
2025-06-25 17:06:49 -07:00
2025-11-14 18:23:19 +03:00
2025-12-12 06:31:00 +02:00
2025-09-12 12:39:31 +03:00
2025-10-26 21:33:00 -04:00
2026-01-13 12:18:57 -05:00
2025-09-10 16:50:45 -05:00
2025-05-12 15:33:37 +02:00
2025-03-28 10:18:04 +01:00
2025-08-01 08:55:50 +03:00
2025-11-14 17:45:23 +00:00
2025-08-20 20:31:33 -04:00