rust/tests/ui/half-open-range-patterns
Matthias Krüger 0de803c38d
Rollup merge of #138632 - clubby789:stabilize-cfg-boolean-lit, r=davidtwco,Urgau,traviscross
Stabilize `cfg_boolean_literals`

Closes #131204
`@rustbot` labels +T-lang +I-lang-nominated
This will end up conflicting with the test in #138293 so whichever doesn't land first will need updating

--

# Stabilization Report

## General design

### What is the RFC for this feature and what changes have occurred to the user-facing design since the RFC was finalized?

[RFC 3695](https://github.com/rust-lang/rfcs/pull/3695), none.

### What behavior are we committing to that has been controversial? Summarize the major arguments pro/con.

None

### Are there extensions to this feature that remain unstable? How do we know that we are not accidentally committing to those?

None

## Has a call-for-testing period been conducted? If so, what feedback was received?

Yes; only positive feedback was received.

## Implementation quality

### Summarize the major parts of the implementation and provide links into the code (or to PRs)

Implemented in [#131034](https://github.com/rust-lang/rust/pull/131034).

### Summarize existing test coverage of this feature

- [Basic usage, including `#[cfg()]`, `cfg!()` and `#[cfg_attr()]`](6d71251cf9/tests/ui/cfg/true-false.rs)
- [`--cfg=true/false` on the command line being accessible via `r#true/r#false`](6d71251cf9/tests/ui/cfg/raw-true-false.rs)
- [Interaction with the unstable `#[doc(cfg(..))]` feature](6d71251/tests/rustdoc-ui/cfg-boolean-literal.rs)
- [Denying `--check-cfg=cfg(true/false)`](6d71251/tests/ui/check-cfg/invalid-arguments.rs)
- Ensuring `--cfg false` on the command line doesn't change the meaning of `cfg(false)`: `tests/ui/cfg/cmdline-false.rs`
- Ensuring both `cfg(true)` and `cfg(false)` on the same item result in it being disabled: `tests/ui/cfg/both-true-false.rs`

### What outstanding bugs in the issue tracker involve this feature? Are they stabilization-blocking?

The above mentioned issue; it should not block as it interacts with another unstable feature.

### What FIXMEs are still in the code for that feature and why is it ok to leave them there?

None

### Summarize contributors to the feature by name for recognition and assuredness that people involved in the feature agree with stabilization
- `@clubby789` (RFC)
- `@Urgau` (Implementation in rustc)

### Which tools need to be adjusted to support this feature. Has this work been done?

`rustdoc`'s  unstable`#[doc(cfg(..)]` has been updated to respect it. `cargo` has been updated with a forward compatibility lint to enable supporting it in cargo once stabilized.

## Type system and execution rules

### What updates are needed to the reference/specification? (link to PRs when they exist)

A few lines to be added to the reference for configuration predicates, specified in the RFC.
2025-04-17 06:25:15 +02:00
..
exclusive_range_pattern_syntax_collision.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
exclusive_range_pattern_syntax_collision.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
exclusive_range_pattern_syntax_collision2.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
exclusive_range_pattern_syntax_collision2.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
exclusive_range_pattern_syntax_collision3.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
exclusive_range_pattern_syntax_collision3.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
feature-gate-half-open-range-patterns-in-slices.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
feature-gate-half-open-range-patterns-in-slices.stderr Update tests for new TRPL chapter order 2024-11-23 08:57:25 -07:00
half-open-range-pats-bad-types.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
half-open-range-pats-bad-types.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
half-open-range-pats-exhaustive-fail.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
half-open-range-pats-exhaustive-fail.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
half-open-range-pats-exhaustive-pass.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs Use cfg(false) in UI tests 2025-04-03 21:41:58 +00:00
half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
half-open-range-pats-inclusive-match-arrow.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
half-open-range-pats-inclusive-match-arrow.stderr Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
half-open-range-pats-inclusive-no-end.rs Use cfg(false) in UI tests 2025-04-03 21:41:58 +00:00
half-open-range-pats-inclusive-no-end.stderr Update tests for new TRPL chapter order 2024-11-23 08:57:25 -07:00
half-open-range-pats-ref-ambiguous-interp.rs Use cfg(false) in UI tests 2025-04-03 21:41:58 +00:00
half-open-range-pats-ref-ambiguous-interp.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
half-open-range-pats-semantics.rs Update f16/f128 FIXMEs that needed (NEG_)INFINITY 2024-07-08 18:02:14 -04:00
half-open-range-pats-syntactic-pass.rs Use cfg(false) in UI tests 2025-04-03 21:41:58 +00:00
half-open-range-pats-thir-lower-empty.rs Update f16/f128 FIXMEs that needed (NEG_)INFINITY 2024-07-08 18:02:14 -04:00
half-open-range-pats-thir-lower-empty.stderr Update f16/f128 FIXMEs that needed (NEG_)INFINITY 2024-07-08 18:02:14 -04:00
pat-tuple-4.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
pat-tuple-5.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
pat-tuple-5.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
range_pat_interactions0.rs remove feature(inline_const_pat) 2025-03-21 09:35:31 +01:00
range_pat_interactions1.rs remove feature(inline_const_pat) 2025-03-21 09:35:31 +01:00
range_pat_interactions1.stderr remove feature(inline_const_pat) 2025-03-21 09:35:31 +01:00
slice_pattern_syntax_problem0.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
slice_pattern_syntax_problem0.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
slice_pattern_syntax_problem1.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
slice_pattern_syntax_problem1.stderr Update tests for new TRPL chapter order 2024-11-23 08:57:25 -07:00
slice_pattern_syntax_problem2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00