diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2023-11-22 02:30:43 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2023-11-29 03:58:29 +0100 |
| commit | a3838c855064f55485147c66e0e50b039875613e (patch) | |
| tree | f390c4580092b09a4c93c276bc06c681281e1f1c /compiler/rustc_ast/src/ast.rs | |
| parent | 1bcbb7c93b96828092e83e52d592faa046183d6c (diff) | |
| download | rust-a3838c855064f55485147c66e0e50b039875613e.tar.gz rust-a3838c855064f55485147c66e0e50b039875613e.zip | |
Add `never_patterns` feature gate
Diffstat (limited to 'compiler/rustc_ast/src/ast.rs')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 10776f31c07..f6f25247b9e 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -645,6 +645,7 @@ impl Pat { // These patterns do not contain subpatterns, skip. PatKind::Wild | PatKind::Rest + | PatKind::Never | PatKind::Lit(_) | PatKind::Range(..) | PatKind::Ident(..) @@ -795,6 +796,9 @@ pub enum PatKind { /// only one rest pattern may occur in the pattern sequences. Rest, + // A never pattern `!` + Never, + /// Parentheses in patterns used for grouping (i.e., `(PAT)`). Paren(P<Pat>), |
