diff options
author | Jonas Schievink <[email protected]> | 2021-04-06 19:17:52 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-04-06 19:19:53 +0100 |
commit | 0d4c931416656540771ec29a3133ca2a7244e1be (patch) | |
tree | e8940dd9942a73498ef2792fccf94806a4c692d9 /crates | |
parent | 52c0ecb9825853d83357ccbac9f6fcb4bffa7348 (diff) |
Lower attributes on tuple fields
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_def/src/attr.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index ab77d924a..8a25b8731 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs | |||
@@ -215,12 +215,11 @@ impl Attrs { | |||
215 | let mut res = ArenaMap::default(); | 215 | let mut res = ArenaMap::default(); |
216 | 216 | ||
217 | for (id, fld) in src.value.iter() { | 217 | for (id, fld) in src.value.iter() { |
218 | let attrs = match fld { | 218 | let owner: &dyn AttrsOwner = match fld { |
219 | Either::Left(_tuple) => Attrs::default(), | 219 | Either::Left(tuple) => tuple, |
220 | Either::Right(record) => { | 220 | Either::Right(record) => record, |
221 | RawAttrs::from_attrs_owner(db, src.with_value(record)).filter(db, krate) | ||
222 | } | ||
223 | }; | 221 | }; |
222 | let attrs = RawAttrs::from_attrs_owner(db, src.with_value(owner)).filter(db, krate); | ||
224 | 223 | ||
225 | res.insert(id, attrs); | 224 | res.insert(id, attrs); |
226 | } | 225 | } |