1
Fork 0

Add never_patterns feature gate

This commit is contained in:
Nadrieril 2023-11-22 02:30:43 +01:00
parent 1bcbb7c93b
commit a3838c8550
40 changed files with 325 additions and 18 deletions

View file

@ -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");