1
Fork 0

Rollup merge of #133424 - Nadrieril:guard-patterns-parsing, r=fee1-dead

Parse guard patterns

This implements the parsing of [RFC3637 Guard Patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see also [tracking issue](https://github.com/rust-lang/rust/issues/129967)). This PR is extracted from https://github.com/rust-lang/rust/pull/129996 with minor modifications.

cc `@max-niederman`
This commit is contained in:
Matthias Krüger 2024-12-08 17:18:50 +01:00 committed by GitHub
commit 1868c8f66f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 328 additions and 81 deletions

View file

@ -505,6 +505,8 @@ declare_features! (
(incomplete, generic_const_items, "1.73.0", Some(113521)),
/// Allows registering static items globally, possibly across crates, to iterate over at runtime.
(unstable, global_registration, "1.80.0", Some(125119)),
/// Allows using guards in patterns.
(incomplete, guard_patterns, "CURRENT_RUSTC_VERSION", Some(129967)),
/// Allows using `..=X` as a patterns in slices.
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
/// Allows `if let` guard in match arms.