about summary refs log tree commit diff
path: root/compiler/rustc_hir_pretty/src/lib.rs
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2023-11-22 02:30:43 +0100
committerNadrieril <nadrieril+git@gmail.com>2023-11-29 03:58:29 +0100
commita3838c855064f55485147c66e0e50b039875613e (patch)
treef390c4580092b09a4c93c276bc06c681281e1f1c /compiler/rustc_hir_pretty/src/lib.rs
parent1bcbb7c93b96828092e83e52d592faa046183d6c (diff)
downloadrust-a3838c855064f55485147c66e0e50b039875613e.tar.gz
rust-a3838c855064f55485147c66e0e50b039875613e.zip
Add `never_patterns` feature gate
Diffstat (limited to 'compiler/rustc_hir_pretty/src/lib.rs')
-rw-r--r--compiler/rustc_hir_pretty/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs
index e9e8c7fd4fc..b7e7d258a90 100644
--- a/compiler/rustc_hir_pretty/src/lib.rs
+++ b/compiler/rustc_hir_pretty/src/lib.rs
@@ -1724,6 +1724,7 @@ impl<'a> State<'a> {
         // is that it doesn't matter
         match pat.kind {
             PatKind::Wild => self.word("_"),
+            PatKind::Never => self.word("!"),
             PatKind::Binding(BindingAnnotation(by_ref, mutbl), _, ident, sub) => {
                 if by_ref == ByRef::Yes {
                     self.word_nbsp("ref");