Files
rust/library/core/src/io
Jacob Pratt b81d8f83c7 Rollup merge of #149749 - joshtriplett:borrowed-buf-generic, r=joboet
Make `BorrowedBuf` and `BorrowedCursor` generic over the data

Replace uses of `u8` with a generic type. This will allow reusing
`BorrowedBuf` elsewhere in the standard library, for purposes other than
byte buffers.

This currently requires `T: Copy`, to prevent `T: Drop`, which would require additional careful handling. We can consider relaxing that restriction in the future if we make `T: Drop` work (without pessimizing `Copy` types like `u8`).

`ensure_init` currently continues to require `u8`. We could potentially generalize it to `T: Default`, but we'd need to ensure it produced the same or better assembly for `u8`.

-----

As discussed in libs-api; cc @Amanieu.
2026-06-11 23:15:19 -04:00
..
2026-05-12 22:59:37 +10:00
2026-05-29 18:14:36 +10:00
2026-05-12 23:07:34 +10:00