Skip to content

Commit bf11781

Browse files
Merge #8381
8381: Lower attributes on tuple fields r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 parents 52c0ecb + 0d4c931 commit bf11781

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

crates/hir_def/src/attr.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,11 @@ impl Attrs {
215215
let mut res = ArenaMap::default();
216216

217217
for (id, fld) in src.value.iter() {
218-
let attrs = match fld {
219-
Either::Left(_tuple) => Attrs::default(),
220-
Either::Right(record) => {
221-
RawAttrs::from_attrs_owner(db, src.with_value(record)).filter(db, krate)
222-
}
218+
let owner: &dyn AttrsOwner = match fld {
219+
Either::Left(tuple) => tuple,
220+
Either::Right(record) => record,
223221
};
222+
let attrs = RawAttrs::from_attrs_owner(db, src.with_value(owner)).filter(db, krate);
224223

225224
res.insert(id, attrs);
226225
}

0 commit comments

Comments
 (0)