From 0d4c931416656540771ec29a3133ca2a7244e1be Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 6 Apr 2021 20:17:52 +0200 Subject: Lower attributes on tuple fields --- crates/hir_def/src/attr.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'crates/hir_def/src') 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 { let mut res = ArenaMap::default(); for (id, fld) in src.value.iter() { - let attrs = match fld { - Either::Left(_tuple) => Attrs::default(), - Either::Right(record) => { - RawAttrs::from_attrs_owner(db, src.with_value(record)).filter(db, krate) - } + let owner: &dyn AttrsOwner = match fld { + Either::Left(tuple) => tuple, + Either::Right(record) => record, }; + let attrs = RawAttrs::from_attrs_owner(db, src.with_value(owner)).filter(db, krate); res.insert(id, attrs); } -- cgit v1.2.3