aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/body/lower.rs')
-rw-r--r--crates/hir_def/src/body/lower.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs
index 73e7aee33..1e743e5d5 100644
--- a/crates/hir_def/src/body/lower.rs
+++ b/crates/hir_def/src/body/lower.rs
@@ -759,7 +759,7 @@ impl ExprCollector<'_> {
759 } 759 }
760 } 760 }
761 ast::Pat::TupleStructPat(p) => { 761 ast::Pat::TupleStructPat(p) => {
762 let path = p.path().and_then(|path| self.expander.parse_path(path)); 762 let path = p.path().and_then(|path| self.expander.parse_path(path)).map(Box::new);
763 let (args, ellipsis) = self.collect_tuple_pat(p.fields()); 763 let (args, ellipsis) = self.collect_tuple_pat(p.fields());
764 Pat::TupleStruct { path, args, ellipsis } 764 Pat::TupleStruct { path, args, ellipsis }
765 } 765 }
@@ -769,7 +769,7 @@ impl ExprCollector<'_> {
769 Pat::Ref { pat, mutability } 769 Pat::Ref { pat, mutability }
770 } 770 }
771 ast::Pat::PathPat(p) => { 771 ast::Pat::PathPat(p) => {
772 let path = p.path().and_then(|path| self.expander.parse_path(path)); 772 let path = p.path().and_then(|path| self.expander.parse_path(path)).map(Box::new);
773 path.map(Pat::Path).unwrap_or(Pat::Missing) 773 path.map(Pat::Path).unwrap_or(Pat::Missing)
774 } 774 }
775 ast::Pat::OrPat(p) => { 775 ast::Pat::OrPat(p) => {
@@ -783,7 +783,7 @@ impl ExprCollector<'_> {
783 } 783 }
784 ast::Pat::WildcardPat(_) => Pat::Wild, 784 ast::Pat::WildcardPat(_) => Pat::Wild,
785 ast::Pat::RecordPat(p) => { 785 ast::Pat::RecordPat(p) => {
786 let path = p.path().and_then(|path| self.expander.parse_path(path)); 786 let path = p.path().and_then(|path| self.expander.parse_path(path)).map(Box::new);
787 let args: Vec<_> = p 787 let args: Vec<_> = p
788 .record_pat_field_list() 788 .record_pat_field_list()
789 .expect("every struct should have a field list") 789 .expect("every struct should have a field list")