about summary refs log tree commit diff
path: root/library/std/src/io/tests.rs
diff options
context:
space:
mode:
authorBenoît du Garreau <bdgdlm@outlook.com>2024-02-07 16:21:16 +0100
committerBenoît du Garreau <bdgdlm@outlook.com>2024-02-07 16:46:28 +0100
commit0a42a540c603846aa22f29f378a61a64c9d4383e (patch)
treedad404fa90ea313e7dd072af4b62a44a568e59ee /library/std/src/io/tests.rs
parent0809f78c190eb9fdf36353d423147827610f33c9 (diff)
downloadrust-0a42a540c603846aa22f29f378a61a64c9d4383e.tar.gz
rust-0a42a540c603846aa22f29f378a61a64c9d4383e.zip
Make `io::BorrowedCursor::advance` safe
This also keeps the old `advance` method under `advance_unchecked` name.

This makes pattern like `std::io::default_read_buf` safe to write.
Diffstat (limited to 'library/std/src/io/tests.rs')
-rw-r--r--library/std/src/io/tests.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/io/tests.rs b/library/std/src/io/tests.rs
index 33e9d8efed5..fd7e51688cd 100644
--- a/library/std/src/io/tests.rs
+++ b/library/std/src/io/tests.rs
@@ -655,7 +655,7 @@ fn bench_take_read_buf(b: &mut test::Bencher) {
 
 // Issue #120603
 #[test]
-#[should_panic = "read should not return more bytes than there is capacity for in the read buffer"]
+#[should_panic]
 fn read_buf_broken_read() {
     struct MalformedRead;