Auto merge of #92353 - Kobzol:doc-attr-lists-gat, r=GuillaumeGomez
Rustdoc: remove ListAttributesIter and use impl Iterator instead
This is a continuation of https://github.com/rust-lang/rust/pull/92227.
I found that `ListAttributesIter` did not optimize well and replacing it with a simple `impl Iterator` resulted in 1-3 % instruction count wins locally.
Because I needed to use `impl Iterator` on a slice of AST attributes, I had to implement it using GAT + impl trait. I also have a version without GAT [here](5470e2a65c
), if GATs are not welcome in rustdoc :D Locally it resulted in equal performance numbers.
Can I ask for a perf. run? Thanks.
r? rust-lang/rustdoc
This commit is contained in:
commit
92ed8747f2
2 changed files with 19 additions and 46 deletions
|
@ -16,6 +16,8 @@
|
|||
#![feature(once_cell)]
|
||||
#![feature(type_ascription)]
|
||||
#![feature(iter_intersperse)]
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![feature(generic_associated_types)]
|
||||
#![recursion_limit = "256"]
|
||||
#![warn(rustc::internal)]
|
||||
#![allow(clippy::collapsible_if, clippy::collapsible_else_if)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue