diff options
| author | bors <bors@rust-lang.org> | 2022-08-22 00:34:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-22 00:34:02 +0000 |
| commit | 3ce46b74aa3968b459cff3ce5c0d4f13e220b217 (patch) | |
| tree | 6ac719850e121ccc2c5f7826874a2fb9de8b768e /src/test/ui | |
| parent | 0b71ffca18a9f4a9515773b2c23d13f501d1e08f (diff) | |
| parent | 619b8abaa65efd7fcc05453381e532ed8b716cf0 (diff) | |
Auto merge of #100668 - nnethercote:use-AttrVec-more, r=spastorino
Use `AttrVec` more In some places we use `Vec<Attribute>` and some places we use `ThinVec<Attribute>` (a.k.a. `AttrVec`). This results in various points where we have to convert between `Vec` and `ThinVec`. This commit changes the places that use `Vec<Attribute>` to use `AttrVec`. A lot of this is mechanical and boring, but there are some interesting parts: - It adds a few new methods to `ThinVec`. - It implements `MapInPlace` for `ThinVec`, and introduces a macro to avoid the repetition of this trait for `Vec`, `SmallVec`, and `ThinVec`. Overall, it makes the code a little nicer, and has little effect on performance. But it is a precursor to removing `rustc_data_structures::ThinVec` and replacing it with `thin_vec::ThinVec`, which is implemented more efficiently. r? `@spastorino`
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/stats/hir-stats.stderr | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/src/test/ui/stats/hir-stats.stderr b/src/test/ui/stats/hir-stats.stderr index 61cb7b25e49..eb828bb9a2c 100644 --- a/src/test/ui/stats/hir-stats.stderr +++ b/src/test/ui/stats/hir-stats.stderr @@ -4,58 +4,58 @@ PRE EXPANSION AST STATS Name Accumulated Size Count Item Size ---------------------------------------------------------------- ExprField 48 ( 0.6%) 1 48 -Attribute 64 ( 0.7%) 2 32 +Crate 56 ( 0.7%) 1 56 +Attribute 64 ( 0.8%) 2 32 - Normal 32 ( 0.4%) 1 - DocComment 32 ( 0.4%) 1 -GenericArgs 64 ( 0.7%) 1 64 -- AngleBracketed 64 ( 0.7%) 1 -Local 72 ( 0.8%) 1 72 -WherePredicate 72 ( 0.8%) 1 72 -- BoundPredicate 72 ( 0.8%) 1 -Crate 72 ( 0.8%) 1 72 +GenericArgs 64 ( 0.8%) 1 64 +- AngleBracketed 64 ( 0.8%) 1 +Local 72 ( 0.9%) 1 72 +WherePredicate 72 ( 0.9%) 1 72 +- BoundPredicate 72 ( 0.9%) 1 Arm 96 ( 1.1%) 2 48 -ForeignItem 112 ( 1.3%) 1 112 -- Fn 112 ( 1.3%) 1 -FieldDef 160 ( 1.8%) 2 80 -Stmt 160 ( 1.8%) 5 32 +ForeignItem 96 ( 1.1%) 1 96 +- Fn 96 ( 1.1%) 1 +FieldDef 160 ( 1.9%) 2 80 +Stmt 160 ( 1.9%) 5 32 - Local 32 ( 0.4%) 1 - MacCall 32 ( 0.4%) 1 - Expr 96 ( 1.1%) 3 -Param 160 ( 1.8%) 4 40 -FnDecl 200 ( 2.3%) 5 40 +Param 160 ( 1.9%) 4 40 +FnDecl 200 ( 2.4%) 5 40 Variant 240 ( 2.8%) 2 120 -Block 288 ( 3.3%) 6 48 -GenericBound 352 ( 4.0%) 4 88 -- Trait 352 ( 4.0%) 4 -AssocItem 480 ( 5.5%) 4 120 -- TyAlias 240 ( 2.8%) 2 -- Fn 240 ( 2.8%) 2 -GenericParam 520 ( 6.0%) 5 104 -PathSegment 720 ( 8.3%) 30 24 -Expr 832 ( 9.6%) 8 104 +Block 288 ( 3.4%) 6 48 +GenericBound 352 ( 4.2%) 4 88 +- Trait 352 ( 4.2%) 4 +AssocItem 416 ( 4.9%) 4 104 +- TyAlias 208 ( 2.5%) 2 +- Fn 208 ( 2.5%) 2 +GenericParam 520 ( 6.1%) 5 104 +PathSegment 720 ( 8.5%) 30 24 +Expr 832 ( 9.8%) 8 104 - Path 104 ( 1.2%) 1 - Match 104 ( 1.2%) 1 - Struct 104 ( 1.2%) 1 -- Lit 208 ( 2.4%) 2 -- Block 312 ( 3.6%) 3 -Pat 840 ( 9.7%) 7 120 +- Lit 208 ( 2.5%) 2 +- Block 312 ( 3.7%) 3 +Pat 840 ( 9.9%) 7 120 - Struct 120 ( 1.4%) 1 - Wild 120 ( 1.4%) 1 -- Ident 600 ( 6.9%) 5 -Ty 1_344 (15.5%) 14 96 +- Ident 600 ( 7.1%) 5 +Ty 1_344 (15.9%) 14 96 - Rptr 96 ( 1.1%) 1 - Ptr 96 ( 1.1%) 1 -- ImplicitSelf 192 ( 2.2%) 2 -- Path 960 (11.0%) 10 -Item 1_800 (20.7%) 9 200 -- Trait 200 ( 2.3%) 1 -- Enum 200 ( 2.3%) 1 -- ForeignMod 200 ( 2.3%) 1 -- Impl 200 ( 2.3%) 1 -- Fn 400 ( 4.6%) 2 -- Use 600 ( 6.9%) 3 +- ImplicitSelf 192 ( 2.3%) 2 +- Path 960 (11.4%) 10 +Item 1_656 (19.6%) 9 184 +- Trait 184 ( 2.2%) 1 +- Enum 184 ( 2.2%) 1 +- ForeignMod 184 ( 2.2%) 1 +- Impl 184 ( 2.2%) 1 +- Fn 368 ( 4.4%) 2 +- Use 552 ( 6.5%) 3 ---------------------------------------------------------------- -Total 8_696 +Total 8_456 POST EXPANSION AST STATS @@ -63,15 +63,15 @@ POST EXPANSION AST STATS Name Accumulated Size Count Item Size ---------------------------------------------------------------- ExprField 48 ( 0.5%) 1 48 +Crate 56 ( 0.6%) 1 56 GenericArgs 64 ( 0.7%) 1 64 - AngleBracketed 64 ( 0.7%) 1 Local 72 ( 0.8%) 1 72 WherePredicate 72 ( 0.8%) 1 72 - BoundPredicate 72 ( 0.8%) 1 -Crate 72 ( 0.8%) 1 72 Arm 96 ( 1.0%) 2 48 -ForeignItem 112 ( 1.2%) 1 112 -- Fn 112 ( 1.2%) 1 +ForeignItem 96 ( 1.0%) 1 96 +- Fn 96 ( 1.0%) 1 InlineAsm 120 ( 1.3%) 1 120 Attribute 128 ( 1.4%) 4 32 - DocComment 32 ( 0.3%) 1 @@ -82,42 +82,42 @@ Stmt 160 ( 1.7%) 5 32 - Semi 32 ( 0.3%) 1 - Expr 96 ( 1.0%) 3 Param 160 ( 1.7%) 4 40 -FnDecl 200 ( 2.1%) 5 40 -Variant 240 ( 2.5%) 2 120 -Block 288 ( 3.0%) 6 48 -GenericBound 352 ( 3.7%) 4 88 -- Trait 352 ( 3.7%) 4 -AssocItem 480 ( 5.1%) 4 120 -- TyAlias 240 ( 2.5%) 2 -- Fn 240 ( 2.5%) 2 -GenericParam 520 ( 5.5%) 5 104 -PathSegment 792 ( 8.4%) 33 24 -Pat 840 ( 8.9%) 7 120 +FnDecl 200 ( 2.2%) 5 40 +Variant 240 ( 2.6%) 2 120 +Block 288 ( 3.1%) 6 48 +GenericBound 352 ( 3.8%) 4 88 +- Trait 352 ( 3.8%) 4 +AssocItem 416 ( 4.5%) 4 104 +- TyAlias 208 ( 2.3%) 2 +- Fn 208 ( 2.3%) 2 +GenericParam 520 ( 5.7%) 5 104 +PathSegment 792 ( 8.6%) 33 24 +Pat 840 ( 9.1%) 7 120 - Struct 120 ( 1.3%) 1 - Wild 120 ( 1.3%) 1 -- Ident 600 ( 6.3%) 5 -Expr 936 ( 9.9%) 9 104 +- Ident 600 ( 6.5%) 5 +Expr 936 (10.2%) 9 104 - Path 104 ( 1.1%) 1 - Match 104 ( 1.1%) 1 - Struct 104 ( 1.1%) 1 - InlineAsm 104 ( 1.1%) 1 -- Lit 208 ( 2.2%) 2 -- Block 312 ( 3.3%) 3 -Ty 1_344 (14.2%) 14 96 +- Lit 208 ( 2.3%) 2 +- Block 312 ( 3.4%) 3 +Ty 1_344 (14.6%) 14 96 - Rptr 96 ( 1.0%) 1 - Ptr 96 ( 1.0%) 1 -- ImplicitSelf 192 ( 2.0%) 2 -- Path 960 (10.2%) 10 -Item 2_200 (23.3%) 11 200 -- Trait 200 ( 2.1%) 1 -- Enum 200 ( 2.1%) 1 -- ExternCrate 200 ( 2.1%) 1 -- ForeignMod 200 ( 2.1%) 1 -- Impl 200 ( 2.1%) 1 -- Fn 400 ( 4.2%) 2 -- Use 800 ( 8.5%) 4 +- ImplicitSelf 192 ( 2.1%) 2 +- Path 960 (10.5%) 10 +Item 2_024 (22.0%) 11 184 +- Trait 184 ( 2.0%) 1 +- Enum 184 ( 2.0%) 1 +- ExternCrate 184 ( 2.0%) 1 +- ForeignMod 184 ( 2.0%) 1 +- Impl 184 ( 2.0%) 1 +- Fn 368 ( 4.0%) 2 +- Use 736 ( 8.0%) 4 ---------------------------------------------------------------- -Total 9_456 +Total 9_184 HIR STATS |
