Move std::io::Error into core#155625
Conversation
This comment has been minimized.
This comment has been minimized.
b86f41f to
c538e5d
Compare
This comment has been minimized.
This comment has been minimized.
6c37f53 to
65d4011
Compare
This comment has been minimized.
This comment has been minimized.
65d4011 to
56a8e8c
Compare
93b1fa3 to
d3835aa
Compare
This comment has been minimized.
This comment has been minimized.
|
example of how to link from |
d3835aa to
8bfceb6
Compare
That's a clever trick I never knew about! Looks like it's also required for linking to incoherent implementations even within the file that creates them too. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8bfceb6 to
96864eb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
96864eb to
7cad458
Compare
This comment has been minimized.
This comment has been minimized.
maybe just leave it until you get the PR to work, that way there's less comment spam. |
|
@bors r+ rollup=never |
|
@bors p=1 |
This comment has been minimized.
This comment has been minimized.
Move `std::io::Error` into `core` ACP: rust-lang/libs-team#755 Tracking issue: #154046 Related: #155574 Related: #152918 ## Description Moves `std::io::Error` into `core`, deferring `Box`-adjacent methods to incoherent implementations in `alloc`, and `RawOsError` methods to `std`. This requires some substantial changes to the internals of `Error`, but none of them are breaking changes or externally visible. Notably, I've replaced usage of `Box` with a wrapper around a pointer and an appropriate drop function. This requires the addition of quite a few lines of unsafe, but is required to work around `Box` only being accessible from `alloc`. Additionally, an atomic pointer to a VTable is used for working with `RawOsError` in `core`, since we cannot know the required implementations without `std`. As mention in [this comment](#155625 (comment)), there may be concern around having a static `AtomicPtr` in `core` for certain users. I've added a configuration option `no_io_statics` which (similar to `no_sync`/etc. in `alloc`) can be used to prevent their inclusion in `core`. When active, the fallback default implementation will always be used. --- ## Notes * This PR adopts the VTable technique from #152918 * This PR builds on my previous PR #155574 * No AI tooling of any kind was used during the creation of this PR.
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 281a1ae failed: CI. Failed job:
|
Previous limit of 40,000 is now broken by 2,281 bytes.
|
Failure seems to be caused by the final WASM output of the I'm pushing a commit which increases the limit to 45,000 bytes, as I'm unsure what could be done otherwise. The |
|
@rustbot ready |
|
@bors r=Mark-Simulacrum |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing df6ee90 (parent) -> 7fb284d (this PR) Test differencesShow 222 test diffs222 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 7fb284d9037fa54f6a9b24261c82b394472cbfd7 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (7fb284d): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -0.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.0%, secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.8%, secondary 1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 485.504s -> 486.093s (0.12%) |
View all comments
ACP: rust-lang/libs-team#755
Tracking issue: #154046
Related: #155574
Related: #152918
Description
Moves
std::io::Errorintocore, deferringBox-adjacent methods to incoherent implementations inalloc, andRawOsErrormethods tostd. This requires some substantial changes to the internals ofError, but none of them are breaking changes or externally visible.Notably, I've replaced usage of
Boxwith a wrapper around a pointer and an appropriate drop function. This requires the addition of quite a few lines of unsafe, but is required to work aroundBoxonly being accessible fromalloc. Additionally, an atomic pointer to a VTable is used for working withRawOsErrorincore, since we cannot know the required implementations withoutstd.As mention in this comment, there may be concern around having a static
AtomicPtrincorefor certain users. I've added a configuration optionno_io_staticswhich (similar tono_sync/etc. inalloc) can be used to prevent their inclusion incore. When active, the fallback default implementation will always be used.Notes
std::iotoalloc#152918std::io::RawOsErrortocore::io#155574