Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo of moving std::io::Error to core #116685

Closed

Conversation

programmerjake
Copy link
Member

I mostly wanted to show my idea for how to move std::io::Error to core. I use AtomicPtr to fill in the parts that are needed from alloc/std, but that should probably be replaced with something like #[panic_handler] or #[global_allocator] except where it resolves to a null pointer instead of erroring if not provided.

I am not very likely to finish this off due to lack of time, so, anyone who wants to, feel free to base your code on mine.

@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2023

r? @cuviper

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 13, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@programmerjake

This comment was marked as resolved.

@cuviper
Copy link
Member

cuviper commented Oct 13, 2023

afaict there's only one place core::io::Error::new is defined,

I think it's because the incoherent impl is added in two alloc compilations, cfg(test) and cfg(not(test)).

@rustbot rustbot added O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows labels Oct 13, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-15 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=programmerjake
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_4571beb0-553e-4813-a89a-321e12fb9b6e
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=7ba5d2214672234f41f1de818b9600dd92188ac4
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_4571beb0-553e-4813-a89a-321e12fb9b6e
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_4571beb0-553e-4813-a89a-321e12fb9b6e
GITHUB_TRIGGERING_ACTOR=programmerjake
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/116685/merge
GITHUB_WORKFLOW_SHA=7ba5d2214672234f41f1de818b9600dd92188ac4
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
##[group]Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.10s
##[endgroup]
##[group]Testing stage0 Linkcheck (x86_64-unknown-linux-gnu)
core/io/error_internals/type.Result.html:248: broken link - `core/std/error/index.html`
core/io/error_internals/type.Result.html:250: broken link - `core/std/error/index.html`
number of HTML files scanned: 34873
number of HTML redirects found: 10560
number of links checked: 3737983
number of links ignored due to external: 93907

@lygstate
Copy link
Contributor

looks good to me

@bors
Copy link
Contributor

bors commented Nov 9, 2023

☔ The latest upstream changes (presumably #117736) made this pull request unmergeable. Please resolve the merge conflicts.

@cuviper
Copy link
Member

cuviper commented Jan 25, 2024

I'm clearing this from my queue while it's in draft, but you can use ready when you are.

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 25, 2024
@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 25, 2024
@Dylan-DPC
Copy link
Member

@programmerjake any updates on this? thanks

@programmerjake
Copy link
Member Author

@programmerjake any updates on this? thanks

as stated on the top comment:

I am not very likely to finish this off due to lack of time, so, anyone who wants to, feel free to base your code on mine.

my lack of time hasn't changed.

@Dylan-DPC
Copy link
Member

Thanks for the update. I'm going close this since it will remain inactive and bitrot (already has). When you have the time you can reöpen or preferably create a new pr and link to this one.

@Dylan-DPC Dylan-DPC closed this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants