-
Notifications
You must be signed in to change notification settings - Fork 13.5k
update cfg_select!
documentation
#143941
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
update cfg_select!
documentation
#143941
Conversation
tests/ui/macros/cfg_select.rs
Outdated
@@ -25,3 +25,6 @@ cfg_select! { | |||
//~^ ERROR none of the rules in this `cfg_select` evaluated to true | |||
false => {} | |||
} | |||
|
|||
cfg_select! {} | |||
//~^ ERROR none of the rules in this `cfg_select` evaluated to true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessarily a matter for this PR, but we should probably update this to refer to predicates rather than rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's easier to just have the terminology be consistent, so I replaced "rule" with "predicate" everywhere.
and make internal terminology consistent Co-authored-by: Travis Cross <[email protected]>
b657a5e
to
d0153f5
Compare
Thanks @folkertdev for making this update. @bors r+ rollup |
…iscross update `cfg_select!` documentation tracking issue: rust-lang#115585 After rust-lang#143461, and with an eye on a soon(ish) stabilization, I think the docs need some work. The existing text read more like a motivation for the feature existing to me, so I've tried to now be a bit more descriptive. Still, suggestions are very welcome. I also added a test for an empty `select! {}` because it's just the sort of thing that might break. r? `@traviscross`
Rollup of 16 pull requests Successful merges: - #142301 (tests: Fix duplicated-path-in-error fail with musl) - #142936 (rustdoc-json: Structured attributes) - #143355 (wrapping shift: remove first bitmask and table) - #143630 (Drop `./x suggest`) - #143738 (Move several float tests to floats/mod.rs) - #143752 (Don't panic if WASI_SDK_PATH not set when detecting compiler) - #143820 (Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets) - #143837 (Adjust `run_make_support::symbols` helpers) - #143878 (Port `#[pointee]` to the new attribute parsing infrastructure) - #143907 (core: make `str::split_at_unchecked()` inline) - #143910 (Add experimental `backtrace-trace-only` std feature) - #143927 (Preserve constness in trait objects up to hir ty lowering) - #143935 (rustc_type_ir/walk: move docstring to `TypeWalker` itself) - #143938 (Update books) - #143941 (update `cfg_select!` documentation) - #143948 (Update mdbook to 0.4.52) Failed merges: - #143926 (Remove deprecated fields in bootstrap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 16 pull requests Successful merges: - #142301 (tests: Fix duplicated-path-in-error fail with musl) - #142936 (rustdoc-json: Structured attributes) - #143355 (wrapping shift: remove first bitmask and table) - #143630 (Drop `./x suggest`) - #143738 (Move several float tests to floats/mod.rs) - #143752 (Don't panic if WASI_SDK_PATH not set when detecting compiler) - #143820 (Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets) - #143837 (Adjust `run_make_support::symbols` helpers) - #143878 (Port `#[pointee]` to the new attribute parsing infrastructure) - #143907 (core: make `str::split_at_unchecked()` inline) - #143910 (Add experimental `backtrace-trace-only` std feature) - #143927 (Preserve constness in trait objects up to hir ty lowering) - #143935 (rustc_type_ir/walk: move docstring to `TypeWalker` itself) - #143938 (Update books) - #143941 (update `cfg_select!` documentation) - #143948 (Update mdbook to 0.4.52) Failed merges: - #143926 (Remove deprecated fields in bootstrap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 13 pull requests Successful merges: - #142301 (tests: Fix duplicated-path-in-error fail with musl) - #143630 (Drop `./x suggest`) - #143736 (Give all bytes of TypeId provenance) - #143752 (Don't panic if WASI_SDK_PATH not set when detecting compiler) - #143837 (Adjust `run_make_support::symbols` helpers) - #143878 (Port `#[pointee]` to the new attribute parsing infrastructure) - #143905 (Recover and suggest to use `;` to construct array type) - #143907 (core: make `str::split_at_unchecked()` inline) - #143910 (Add experimental `backtrace-trace-only` std feature) - #143927 (Preserve constness in trait objects up to hir ty lowering) - #143935 (rustc_type_ir/walk: move docstring to `TypeWalker` itself) - #143938 (Update books) - #143941 (update `cfg_select!` documentation) Failed merges: - #143926 (Remove deprecated fields in bootstrap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143941 - folkertdev:cfg-select-docs, r=traviscross update `cfg_select!` documentation tracking issue: #115585 After #143461, and with an eye on a soon(ish) stabilization, I think the docs need some work. The existing text read more like a motivation for the feature existing to me, so I've tried to now be a bit more descriptive. Still, suggestions are very welcome. I also added a test for an empty `select! {}` because it's just the sort of thing that might break. r? ``@traviscross``
tracking issue: #115585
After #143461, and with an eye on a soon(ish) stabilization, I think the docs need some work.
The existing text read more like a motivation for the feature existing to me, so I've tried to now be a bit more descriptive. Still, suggestions are very welcome.
I also added a test for an empty
select! {}
because it's just the sort of thing that might break.r? @traviscross