Update crates/hir-expand/src/attrs.rs

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
Hayashi Mikihiro 2025-05-06 16:27:23 +09:00
parent 546065a315
commit b9a3e70ccb

View file

@ -460,7 +460,7 @@ pub fn collect_attrs(
owner: &dyn ast::HasAttrs,
) -> impl Iterator<Item = (AttrId, Either<ast::Attr, ast::Comment>)> {
let inner_attrs =
inner_attributes(owner.syntax()).into_iter().flatten().map(|attr| (attr, true));
inner_attributes(owner.syntax()).into_iter().flatten().zip(iter::repeat(true));
let outer_attrs = ast::AttrDocCommentIter::from_syntax_node(owner.syntax())
.filter(|el| match el {
Either::Left(attr) => attr.kind().is_outer(),