diff options
| author | Young-Flash <dongyang@apache.org> | 2024-01-25 19:27:37 +0800 |
|---|---|---|
| committer | Young-Flash <dongyang@apache.org> | 2024-01-25 19:27:37 +0800 |
| commit | 4505f03fbfd8eeb326135d644afc83f159965b4f (patch) | |
| tree | be1b0480c1041be5875ad1add6bb8b57070e042b | |
| parent | d410d4a2baf9e99b37b03dd42f06238b14374bf7 (diff) | |
| download | rust-4505f03fbfd8eeb326135d644afc83f159965b4f.tar.gz rust-4505f03fbfd8eeb326135d644afc83f159965b4f.zip | |
fix: filter out cfg disabled filed when lowering `RecordPat`
| -rw-r--r-- | crates/hir-def/src/body/lower.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/hir-def/src/body/lower.rs b/crates/hir-def/src/body/lower.rs index 5fc4867bfa6..492ea6d5c59 100644 --- a/crates/hir-def/src/body/lower.rs +++ b/crates/hir-def/src/body/lower.rs @@ -1335,6 +1335,7 @@ impl ExprCollector<'_> { let args = record_pat_field_list .fields() .filter_map(|f| { + self.check_cfg(&f)?; let ast_pat = f.pat()?; let pat = self.collect_pat(ast_pat, binding_list); let name = f.field_name()?.as_name(); |
