-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rename cfg_match!
to cfg_select!
#137198
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
Rename cfg_match!
to cfg_select!
#137198
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
Some changes occurred in compiler/rustc_codegen_gcc Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
r? libs-api |
Nominating for discussion. |
Speaking for myself only: not in favor of this rename. |
☔ The latest upstream changes (presumably #137237) made this pull request unmergeable. Please resolve the merge conflicts. |
From the meeting notes, TC mentioned |
That is what I always called the macro myself, in my versions. It's probably the most correct PL theory name for the construct.
match () {
_ if predicate1 => ..,
_ if predicate2 => ..,
_ if predicate3 => ..,
_ => ..,
} (That is, as So it's in that sense that I think |
I don't have a strong opinion here only that having "match" in the name when it is notably different to |
This was discussed in the @rust-lang/libs-api meeting last week. We decided to stick with the |
As per the @rust-lang/libs-api decision in #115585 (comment), I'm re-opening this PR to rename |
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
3a231bf
to
0e238c2
Compare
The Miri subtree was changed cc @rust-lang/miri |
At [1] it was pointed out that `cfg_match!` syntax does not actually align well with match syntax, which is a possible source of confusion. The comment points out that usage is instead more similar to ecosystem `select!` macros. Rename `cfg_match!` to `cfg_select!` to match this. Tracking issue: rust-lang#115585 [1]: rust-lang#115585 (comment)
0e238c2
to
999967a
Compare
Rebased, it looks like no bootstrap config is needed anymore. @rustbot ready |
@bors r+ |
☀️ Test successful - checks-actions |
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 5df0f72 (parent) -> 6eef33b (this PR) Test differencesShow 28 test diffsStage 0
Stage 1
Additionally, 8 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 6eef33bb399cabfab16aa4e0825895f5f32f4e26 --output-dir test-dashboard And 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 (6eef33b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -1.7%, secondary -3.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.959s -> 777.17s (0.03%) |
@Nemo157 pointed out that
cfg_match!
syntax does not actually align well with match syntax, which is a possible source of confusion. The comment points out that usage is instead more similar to ecosystemselect!
macros. Renamecfg_match!
tocfg_select!
to match this.Tracking issue: #115585