joboet
42cc28ac8b
std: add type alias for raw OS errors
...
Implement rust-lang/libs-team#173 .
2023-01-31 17:23:35 +01:00
Nikolai Vazquez
734a91358b
Remove unnecessary &format!
...
These were likely from before the `PartialEq<str>` impl for `&String`.
2023-01-21 22:06:42 -05:00
yukang
c67903ef21
fix issues in unused lint
2023-01-14 17:11:04 +08:00
jonathanCogan
db47071df2
Replace libstd, libcore, liballoc in line comments.
2022-12-30 14:00:42 +01:00
Rageking8
d1982bd0af
fix small word dupe typos
2022-10-13 00:53:46 +08:00
Maybe Waffle
53565b23ac
Make use of [wrapping_]byte_{add,sub}
...
...replacing `.cast().wrapping_offset().cast()` & similar code.
2022-08-23 19:32:37 +04:00
Jiahao XU
111253c519
Rename std::io::Error::try_downcast_inner to downcast
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-14 11:24:44 +10:00
Jiahao XU
d2211c9fdc
Add new unit test test_try_downcast_inner
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-22 23:09:30 +10:00
Jiahao XU
1713e25a41
Impl io::error::repr_bitpacked::Repr::new
...
that accepts `ErrorData<Box<Custom>>`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-22 22:01:51 +10:00
Jiahao XU
d11ff2a06e
Impl io::error::repr_unpacked::Repr::new
...
that accepts `ErrorData<Box<Custom>>`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-22 22:01:21 +10:00
est31
d75c60f9a3
Use Box::new() instead of box syntax in std tests
2022-05-29 01:44:11 +02:00
Aria Beingessner
7514d760b8
cleanup some of the less terrifying library code
2022-03-29 20:18:27 -04:00
Aria Beingessner
c7de289e1c
Make the stdlib largely conform to strict provenance.
...
Some things like the unwinders and system APIs are not fully conformant,
this only covers a lot of low-hanging fruit.
2022-03-29 20:18:21 -04:00
Thom Chiovoloni
3ac93abfb2
Indicate the correct error code in the compile_fail block.
...
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
2022-03-29 11:45:49 -07:00
Thom Chiovoloni
09d83e292d
Add a compile_fail doctest to check that io::Error: !UnwindSafe
2022-03-23 17:29:19 -07:00
Thom Chiovoloni
b898ad499f
Ensure io::Error's bitpacked repr doesn't accidentally impl UnwindSafe
2022-03-23 17:12:47 -07:00
T-O-R-U-S
72a25d05bf
Use implicit capture syntax in format_args
...
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-03-10 10:23:40 -05:00
Yuki Okushi
a898b31662
Rename to InvalidFilename
2022-02-10 23:49:27 +09:00
Thom Chiovoloni
9cbe99488b
Add more tests for io::Error packing, and fix some comments that weren't quite accurate anymore
2022-02-04 23:15:02 -08:00
Thom Chiovoloni
a17a896d09
Update documentation somewhat
2022-02-04 18:47:31 -08:00
Thom Chiovoloni
e98c7f7209
Use wrapping pointer arithmetic in the bitpacked io::Error
2022-02-04 18:47:31 -08:00
Thom Chiovoloni
f950edbef7
Elaborate some in the documentation and respond to some review comments
2022-02-04 18:47:31 -08:00
Thom Chiovoloni
06edf082c3
Update library/std/src/io/error/repr_bitpacked.rs
...
Co-authored-by: the8472 <the8472@users.noreply.github.com>
2022-02-04 18:47:30 -08:00
Thom Chiovoloni
9f7eb7d473
Fix comment typos noticed by code review.
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2022-02-04 18:47:30 -08:00
Thom Chiovoloni
6b068437cb
Address address comments, improve comments slightly
2022-02-04 18:47:30 -08:00
Thom Chiovoloni
ea211695bf
Optimize io::error::Repr layout on 64 bit targets.
2022-02-04 18:47:30 -08:00
Thom Chiovoloni
554918e311
Hide Repr details from io::Error, and rework io::Error::new_const.
2022-02-04 18:47:29 -08:00
Mara Bos
96783625a0
Add test for io::Error::new_const.
2021-03-21 20:22:26 +01:00
Mara Bos
f398a49829
Add test for io::Error's size.
2021-03-21 20:20:58 +01:00
Lzu Tao
a4e926daee
std: move "mod tests/benches" to separate files
...
Also doing fmt inplace as requested.
2020-08-31 02:56:59 +00:00