-
Notifications
You must be signed in to change notification settings - Fork 13.3k
CommandExt::before_exec: deprecate safety in edition 2024 #125970
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
Conversation
r? @Nilstrieb rustbot has assigned @Nilstrieb. Use |
The doc comment needs to be adjusted. It's confusing at the moment since |
r? libs-api |
Needs a test. I'm not sure if this works since this isn't a free standing function. |
@rustbot labels +I-libs-api-nominated Nominating for libs-api to decide whether to make calls to If we decide to do this, we'll use that same tracking issue: |
I extended the comment and added a test. It seems to be working fine. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This function directly has a comment saying that it should be unsafe, and now we have a way to do that. @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.
Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.
Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.
Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.
Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.
Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.
…trochenkov Allow to customize `// TODO:` comment for deprecated safe autofix Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970. Tracking: - rust-lang#124866
…trochenkov Allow to customize `// TODO:` comment for deprecated safe autofix Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970. Tracking: - rust-lang#124866
Rollup merge of rust-lang#127857 - tbu-:pr_deprecated_safe_todo, r=petrochenkov Allow to customize `// TODO:` comment for deprecated safe autofix Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970. Tracking: - rust-lang#124866
@m-ou-se I rebased, so this should be ready for review now. :) |
@bors r+ |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024) - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target) - rust-lang#128925 (derive(SmartPointer): register helper attributes) - rust-lang#128946 (Hash Ipv*Addr as an integer) - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout) - rust-lang#129015 (Update books) - rust-lang#129067 (Use `append` instead of `extend(drain(..))`) - rust-lang#129100 (Fix dependencies cron job) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024) - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target) - rust-lang#128925 (derive(SmartPointer): register helper attributes) - rust-lang#128946 (Hash Ipv*Addr as an integer) - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout) - rust-lang#129015 (Update books) - rust-lang#129067 (Use `append` instead of `extend(drain(..))`) - rust-lang#129100 (Fix dependencies cron job) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#125970 - RalfJung:before_exec, r=m-ou-se CommandExt::before_exec: deprecate safety in edition 2024 Similar to `set_var`, we had to find out after 1.0 was released that `before_exec` should have been unsafe. We partially rectified this by deprecating that function a long time ago, but since rust-lang#124636 we have the ability to also deprecate the safety of the old function and make it a *hard error* to call the old function outside `unsafe` in the next edition. So just in case anyone still uses the old function, let's ensure this can't be ignored when moving code to the new edition. Cc `@rust-lang/libs-api` Tracking: - rust-lang#124866
Similar to
set_var
, we had to find out after 1.0 was released thatbefore_exec
should have been unsafe. We partially rectified this by deprecating that function a long time ago, but since #124636 we have the ability to also deprecate the safety of the old function and make it a hard error to call the old function outsideunsafe
in the next edition. So just in case anyone still uses the old function, let's ensure this can't be ignored when moving code to the new edition.Cc @rust-lang/libs-api
Tracking:
std::env::{set_var, remove_var}
unsafe #124866