Add barest-bones deref patterns
Co-authored-by: Deadbeef <ent3rm4n@gmail.com>
This commit is contained in:
parent
a128516cf9
commit
120d3570aa
16 changed files with 139 additions and 17 deletions
|
@ -462,6 +462,12 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
|
|||
_ => bug!("pattern has unexpected type: pat: {:?}, ty: {:?}", pat, ty),
|
||||
};
|
||||
}
|
||||
PatKind::DerefPattern { .. } => {
|
||||
// FIXME(deref_patterns): At least detect that `box _` is irrefutable.
|
||||
fields = vec![];
|
||||
arity = 0;
|
||||
ctor = Opaque(OpaqueId::new());
|
||||
}
|
||||
PatKind::Leaf { subpatterns } | PatKind::Variant { subpatterns, .. } => {
|
||||
match ty.kind() {
|
||||
ty::Tuple(fs) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue