Rollup merge of #122793 - compiler-errors:deref-pat-syntax, r=Nadrieril
Implement macro-based deref!() syntax for deref patterns Stop using `box PAT` syntax for deref patterns, and instead use a perma-unstable macro. Blocked on #122222 r? `@Nadrieril`
This commit is contained in:
commit
9cd11c4335
32 changed files with 125 additions and 36 deletions
|
@ -1179,7 +1179,7 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
|
|||
write!(f, "{subpattern}")
|
||||
}
|
||||
PatKind::DerefPattern { ref subpattern } => {
|
||||
write!(f, "k#deref {subpattern}")
|
||||
write!(f, "deref!({subpattern})")
|
||||
}
|
||||
PatKind::Constant { value } => write!(f, "{value}"),
|
||||
PatKind::InlineConstant { def: _, ref subpattern } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue