Update path separators to be available in const context#153196
Update path separators to be available in const context#153196rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Conversation
|
r? @joboet rustbot has assigned @joboet. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Reminder, once the PR becomes ready for a review, use |
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
Change reference to imported MAIN_SEP_STR to local MAIN_SEPARATOR_STR, removing an unnecessary import.
59411ae to
5004ef4
Compare
|
@rustbot ready |
|
Great, thanks! Could you please squash your last three commits together? After that, r=me @bors delegate+ |
|
✌️ @MikkelPaulson, you can now approve this pull request! If @joboet told you to " |
* consolidate various representations of separators in std::sys::path
into a single macro_rules invocation per platform to save
transcription errors
* make `std::path::is_separator()` const
* new constants `std::path::{SEPARATORS, SEPARATORS_STR}`
e726e49 to
098b1b9
Compare
|
👍 |
…uwer Rollup of 12 pull requests Successful merges: - #153402 (miri subtree update) - #152164 (Lint unused features) - #152801 (Refactor WriteBackendMethods a bit) - #153196 (Update path separators to be available in const context) - #153204 (Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors) - #153317 (Abort after `representability` errors) - #153276 (Remove `cycle_fatal` query modifier) - #153300 (Tweak some of our internal `#[rustc_*]` TEST attributes) - #153396 (use `minicore` in some `run-make` tests) - #153401 (Migrationg of `LintDiagnostic` - part 7) - #153406 (Remove a ping for myself) - #153414 (Rename translation -> formatting)
…uwer Rollup of 12 pull requests Successful merges: - #153402 (miri subtree update) - #152164 (Lint unused features) - #152801 (Refactor WriteBackendMethods a bit) - #153196 (Update path separators to be available in const context) - #153204 (Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors) - #153317 (Abort after `representability` errors) - #153276 (Remove `cycle_fatal` query modifier) - #153300 (Tweak some of our internal `#[rustc_*]` TEST attributes) - #153396 (use `minicore` in some `run-make` tests) - #153401 (Migrationg of `LintDiagnostic` - part 7) - #153406 (Remove a ping for myself) - #153414 (Rename translation -> formatting)
…uwer Rollup of 12 pull requests Successful merges: - #153402 (miri subtree update) - #152164 (Lint unused features) - #152801 (Refactor WriteBackendMethods a bit) - #153196 (Update path separators to be available in const context) - #153204 (Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors) - #153317 (Abort after `representability` errors) - #153276 (Remove `cycle_fatal` query modifier) - #153300 (Tweak some of our internal `#[rustc_*]` TEST attributes) - #153396 (use `minicore` in some `run-make` tests) - #153401 (Migrationg of `LintDiagnostic` - part 7) - #153406 (Remove a ping for myself) - #153414 (Rename translation -> formatting)
…uwer Rollup of 12 pull requests Successful merges: - #153402 (miri subtree update) - #152164 (Lint unused features) - #152801 (Refactor WriteBackendMethods a bit) - #153196 (Update path separators to be available in const context) - #153204 (Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors) - #153317 (Abort after `representability` errors) - #153276 (Remove `cycle_fatal` query modifier) - #153300 (Tweak some of our internal `#[rustc_*]` TEST attributes) - #153396 (use `minicore` in some `run-make` tests) - #153401 (Migrationg of `LintDiagnostic` - part 7) - #153406 (Remove a ping for myself) - #153414 (Rename translation -> formatting)
Rollup merge of #153196 - MikkelPaulson:const-path-separators, r=joboet Update path separators to be available in const context Tracking issue: #153106 This makes platform-dependent secondary path separators available in const context (ie. at compile time). The platform definitions have also been consolidated behind a common macro to prevent transcription errors, whereas previously they were defined 3-4 times per platform. ### Questions I've manually verified that this compiles against each platform. It seems like no unit tests should be required for this change; is that correct?
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#153402 (miri subtree update) - rust-lang/rust#152164 (Lint unused features) - rust-lang/rust#152801 (Refactor WriteBackendMethods a bit) - rust-lang/rust#153196 (Update path separators to be available in const context) - rust-lang/rust#153204 (Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors) - rust-lang/rust#153317 (Abort after `representability` errors) - rust-lang/rust#153276 (Remove `cycle_fatal` query modifier) - rust-lang/rust#153300 (Tweak some of our internal `#[rustc_*]` TEST attributes) - rust-lang/rust#153396 (use `minicore` in some `run-make` tests) - rust-lang/rust#153401 (Migrationg of `LintDiagnostic` - part 7) - rust-lang/rust#153406 (Remove a ping for myself) - rust-lang/rust#153414 (Rename translation -> formatting)
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#153402 (miri subtree update) - rust-lang/rust#152164 (Lint unused features) - rust-lang/rust#152801 (Refactor WriteBackendMethods a bit) - rust-lang/rust#153196 (Update path separators to be available in const context) - rust-lang/rust#153204 (Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors) - rust-lang/rust#153317 (Abort after `representability` errors) - rust-lang/rust#153276 (Remove `cycle_fatal` query modifier) - rust-lang/rust#153300 (Tweak some of our internal `#[rustc_*]` TEST attributes) - rust-lang/rust#153396 (use `minicore` in some `run-make` tests) - rust-lang/rust#153401 (Migrationg of `LintDiagnostic` - part 7) - rust-lang/rust#153406 (Remove a ping for myself) - rust-lang/rust#153414 (Rename translation -> formatting)
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#153402 (miri subtree update) - rust-lang/rust#152164 (Lint unused features) - rust-lang/rust#152801 (Refactor WriteBackendMethods a bit) - rust-lang/rust#153196 (Update path separators to be available in const context) - rust-lang/rust#153204 (Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors) - rust-lang/rust#153317 (Abort after `representability` errors) - rust-lang/rust#153276 (Remove `cycle_fatal` query modifier) - rust-lang/rust#153300 (Tweak some of our internal `#[rustc_*]` TEST attributes) - rust-lang/rust#153396 (use `minicore` in some `run-make` tests) - rust-lang/rust#153401 (Migrationg of `LintDiagnostic` - part 7) - rust-lang/rust#153406 (Remove a ping for myself) - rust-lang/rust#153414 (Rename translation -> formatting)
Tracking issue: #153106
This makes platform-dependent secondary path separators available in const context (ie. at compile time). The platform definitions have also been consolidated behind a common macro to prevent transcription errors, whereas previously they were defined 3-4 times per platform.
Questions
I've manually verified that this compiles against each platform. It seems like no unit tests should be required for this change; is that correct?