8381: Lower attributes on tuple fields r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
bors[bot] 2021-04-06 18:20:38 +00:00 committed by GitHub
commit bf11781ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}