Implement macro-based deref!() syntax for deref patterns
Stop using `box PAT` syntax for deref patterns, as it's misleading and also causes their semantics being tangled up.
This commit is contained in:
parent
fb1b198cea
commit
bc0965e2ff
6 changed files with 11 additions and 3 deletions
|
|
@ -689,6 +689,11 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
|
|||
kind!("Box({pat})");
|
||||
self.pat(pat);
|
||||
},
|
||||
PatKind::Deref(pat) => {
|
||||
bind!(self, pat);
|
||||
kind!("Deref({pat})");
|
||||
self.pat(pat);
|
||||
},
|
||||
PatKind::Ref(pat, muta) => {
|
||||
bind!(self, pat);
|
||||
kind!("Ref({pat}, Mutability::{muta:?})");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue