about summary refs log tree commit diff
path: root/library/std/src/io/error/tests.rs
AgeCommit message (Collapse)AuthorLines
2025-03-06library: Use size_of from the prelude instead of importedThalia Archibald-1/+0
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2024-11-26std: update internal uses of `io::const_error!`joboet-5/+5
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-01-19Update `std::io::Error::downcast` return typeJiahao XU-2/+2
and update its doc according to decision made by rust libs-api team. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-31std: add type alias for raw OS errorsjoboet-1/+1
Implement rust-lang/libs-team#173.
2023-01-21Remove unnecessary `&format!`Nikolai Vazquez-1/+1
These were likely from before the `PartialEq<str>` impl for `&String`.
2022-10-13fix small word dupe typosRageking8-1/+1
2022-07-14Rename `std::io::Error::try_downcast_inner` to `downcast`Jiahao XU-7/+7
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-22Add new unit test `test_try_downcast_inner`Jiahao XU-1/+52
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-29Use Box::new() instead of box syntax in std testsest31-3/+3
2022-03-10Use implicit capture syntax in format_argsT-O-R-U-S-4/+4
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
2022-02-04Add more tests for io::Error packing, and fix some comments that weren't ↵Thom Chiovoloni-7/+66
quite accurate anymore
2022-02-04Optimize io::error::Repr layout on 64 bit targets.Thom Chiovoloni-0/+15
2022-02-04Hide Repr details from io::Error, and rework `io::Error::new_const`.Thom Chiovoloni-4/+4
2021-03-21Add test for io::Error::new_const.Mara Bos-0/+10
2021-03-21Add test for io::Error's size.Mara Bos-0/+6
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-0/+53
Also doing fmt inplace as requested.