Closed
Conversation
Comparison of paths and strings is expected to be possible and needed e.g. in tests. This change adds the impls os `PartialEq` between strings and paths, both owned and unsized, in both directions. ACP: rust-lang/libs-team#151
Migrate the standard library from using the external `cfg_if` crate to
using the now-built-in `cfg_select` macro.
This does not yet eliminate the dependency from
`library/std/Cargo.toml`, because while the standard library itself no
longer uses `cfg_if`, it also incorporates the `backtrace` crate, which
does.
Migration assisted by the following vim command (after selecting the
full `cfg_if!` invocation):
```
'<,'>s/\(cfg_if::\)\?cfg_if/cfg_select/ | '<,'>s/^\( *\)} else {/\1}\r\1_ => {/c | '<,'>s/^\( *\)} else if #\[cfg(\(.*\))\] /\1}\r\1\2 => /e | '<,'>s/if #\[cfg(\(.*\))\] {/\1 => {/e
```
This is imperfect, but substantially accelerated the process. This
prompts for confirmation on the `} else {` since that can also appear
inside one of the arms. This also requires manual intervention to handle
any multi-line conditions.
…` file if there is more than one
Member
Author
Collaborator
Member
Author
|
@bors try jobs=test-various,x86_64-gnu-llvm-19-3,dist-ohos-x86_64,aarch64-apple |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
added a commit
that referenced
this pull request
Aug 18, 2025
Rollup of 19 pull requests try-job: test-various try-job: x86_64-gnu-llvm-19-3 try-job: dist-ohos-x86_64 try-job: aarch64-apple
Contributor
Collaborator
bors
added a commit
that referenced
this pull request
Aug 18, 2025
Rollup of 19 pull requests Successful merges: - #140956 (`impl PartialEq<{str,String}> for {Path,PathBuf}`) - #141744 (Stabilize `ip_from`) - #144804 (Don't warn on never to any `as` casts as unreachable) - #144983 (Rehome 37 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - #145025 (run spellcheck as a tidy extra check in ci) - #145041 (rework GAT borrowck limitation error) - #145243 (take attr style into account in diagnostics) - #145359 (Fix bug where `rustdoc-js` tester would not pick the right `search.js` file if there is more than one) - #145429 (Couple of codegen_fn_attrs improvements) - #145452 (Do not strip binaries in bootstrap everytime if they are unchanged) - #145486 (Fix `unicode_data.rs` mention message) - #145489 (library: Migrate from `cfg_if` to `cfg_select`) - #145493 (remove `should_render` in `PrintAttribute` derive) - #145500 (Port must_use to the new target checking) - #145505 (Simplify span caches) - #145511 (Rust build fails on OpenBSD after using file_lock feature) - #145516 (Weekly `cargo update`) - #145533 (Reorder `lto` options from most to least optimizing) - #145550 (Avoid using `()` in `derive(From)` output.) r? `@ghost` `@rustbot` modify labels: rollup
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
💔 Test failed - checks-actions |
This was referenced Aug 18, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
impl PartialEq<{str,String}> for {Path,PathBuf}#140956 (impl PartialEq<{str,String}> for {Path,PathBuf})ip_from#141744 (Stabilizeip_from)ascasts as unreachable #144804 (Don't warn on never to anyascasts as unreachable)tests/ui/issues/tests to other subdirectories undertests/ui/#144983 (Rehome 37tests/ui/issues/tests to other subdirectories undertests/ui/)rustdoc-jstester would not pick the rightsearch.jsfile if there is more than one #145359 (Fix bug whererustdoc-jstester would not pick the rightsearch.jsfile if there is more than one)unicode_data.rsmention message #145486 (Fixunicode_data.rsmention message)cfg_iftocfg_select#145489 (library: Migrate fromcfg_iftocfg_select)should_renderinPrintAttributederive #145493 (removeshould_renderinPrintAttributederive)cargo update#145516 (Weeklycargo update)ltooptions from most to least optimizing #145533 (Reorderltooptions from most to least optimizing)()inderive(From)output. #145550 (Avoid using()inderive(From)output.)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup