std::pat::pattern_type!
is gated by two feature gates with nearly identical names
#128987
Labels
A-contributor-roadblock
Area: Makes things more difficult for new contributors to rust itself
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
F-core_pattern_type
`#![feature(core_pattern_type)]`
F-core_pattern_types
`#![feature(core_pattern_types)]`
F-pattern_types
`#![feature(pattern_types)]`
requires-internal-features
This issue requires the use of internal features.
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
I tried this code (playground):
This resulted in:
I thought I mistyped the feature name, so I tried replacing
core_pattern_type
withcore_pattern_types
:This resulted in:
This is because
std::pat
is gated undercore_pattern_types
(as iscore::pat
), whilecore::pattern_type
(and, by extension,std::pat::pattern_type
) is gated undercore_pattern_type
(note the lack of a trailings
). This can be confusing to people who are trying to usepattern_type!
in the Rust codebase (or, in a hypothetical future, people who are trying to experiment with it in user code).Meta
rustc --version --verbose
:Reproduces on the Playground:
1.82.0-nightly (2024-08-10 730d5d4095a264ef5f7c)
@rustbot label +A-contributor-roadblock +F-pattern_types +requires-internal-features +requires-nightly
The text was updated successfully, but these errors were encountered: