about summary refs log tree commit diff
path: root/library/coretests/tests/io
AgeCommit message (Collapse)AuthorLines
2025-08-14Rollup merge of #142741 - a1phyr:fix_unsoundness, r=Mark-SimulacrumGuillaume Gomez-2/+2
Fix unsoundness in some tests These tests were marked uninit bytes as initilized, which is unsound. Use initialized `MaybeUninit` instead.
2025-07-17Rollup merge of #143829 - a1phyr:trim_borrowed_buf, r=ChrisDentonLeón Orell Valerian Liehr-6/+2
Trim `BorrowedCursor` API This PR removes some method from the unstable `BorrowedCursor` type. A rational for each change can be found in the message of each commit. I don't think that an ACP is required for this, please tell me if it is not the case. Cc rust-lang/rust#78485 rust-lang/rust#117693
2025-07-09core: Change `BorrowedCursor::written`'s originBenoît du Garreau-1/+1
This enable removing the `start` field, so `BorrowedCursor` fits in a single register. Because `written` is almost always used in difference with another call, this changes nothing else in practice.
2025-07-09core: Remove `BorrowedCursor::uninit_mut`Benoît du Garreau-2/+0
I assume that this method was there for completeness, but there is hardly any useful use of it: the buffer it gave was not always connected to the start of the cursor and its use required `unsafe` anyway to mark the bytes as initialized.
2025-07-09core: Remove `BorrowedCursor::init_ref` methodBenoît du Garreau-3/+1
This method was not really useful: at no point one would only need to read the initialized part of the cursor without mutating it.
2025-07-01core: Add `BorrowedCursor::with_unfilled_buf`Benoît du Garreau-0/+36
Implementation of https://github.com/rust-lang/libs-team/issues/367. This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`. Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly.
2025-06-19Fix unsoundness in some testsBenoît du Garreau-2/+2
2025-02-13Migrate coretests to Rust 2024Eric Huss-2/+2
2025-01-26Put all coretests in a separate cratebjorn3-0/+168