We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 343b14f + 30ce8b2 commit 00cdbceCopy full SHA for 00cdbce
crates/hir_def/src/attr.rs
@@ -751,9 +751,7 @@ fn collect_attrs(
751
.chain(inner_docs.into_iter().flatten())
752
.map(|docs_text| (docs_text.syntax().text_range().start(), Either::Right(docs_text)));
753
// sort here by syntax node offset because the source can have doc attributes and doc strings be interleaved
754
- let attrs: Vec<_> = docs.chain(attrs).sorted_by_key(|&(offset, _)| offset).collect();
755
-
756
- attrs.into_iter().map(|(_, attr)| attr)
+ docs.chain(attrs).sorted_by_key(|&(offset, _)| offset).map(|(_, attr)| attr)
757
}
758
759
pub(crate) fn variants_attrs_source_map(
0 commit comments