mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
37ed7a4438
This is a very large commit since a lot needs to be changed in order to make the tests pass. The salient changes are: - `ConstArgKind` gets a new `Path` variant, and all const params are now represented using it. Non-param paths still use `ConstArgKind::Anon` to prevent this change from getting too large, but they will soon use the `Path` variant too. - `ConstArg` gets a distinct `hir_id` field and its own variant in `hir::Node`. This affected many parts of the compiler that expected the parent of an `AnonConst` to be the containing context (e.g., an array repeat expression). They have been changed to check the "grandparent" where necessary. - Some `ast::AnonConst`s now have their `DefId`s created in rustc_ast_lowering rather than `DefCollector`. This is because in some cases they will end up becoming a `ConstArgKind::Path` instead, which has no `DefId`. We have to solve this in a hacky way where we guess whether the `AnonConst` could end up as a path const since we can't know for sure until after name resolution (`N` could refer to a free const or a nullary struct). If it has no chance as being a const param, then we create a `DefId` in `DefCollector` -- otherwise we decide during ast_lowering. This will have to be updated once all path consts use `ConstArgKind::Path`. - We explicitly use `ConstArgHasType` for array lengths, rather than implicitly relying on anon const type feeding -- this is due to the addition of `ConstArgKind::Path`. - Some tests have their outputs changed, but the changes are for the most part minor (including removing duplicate or almost-duplicate errors). One test now ICEs, but it is for an incomplete, unstable feature and is now tracked at #127009.
179 lines
12 KiB
Plaintext
179 lines
12 KiB
Plaintext
ast-stats-1 PRE EXPANSION AST STATS
|
|
ast-stats-1 Name Accumulated Size Count Item Size
|
|
ast-stats-1 ----------------------------------------------------------------
|
|
ast-stats-1 GenericArgs 40 ( 0.6%) 1 40
|
|
ast-stats-1 - AngleBracketed 40 ( 0.6%) 1
|
|
ast-stats-1 Crate 40 ( 0.6%) 1 40
|
|
ast-stats-1 ExprField 48 ( 0.7%) 1 48
|
|
ast-stats-1 WherePredicate 56 ( 0.8%) 1 56
|
|
ast-stats-1 - BoundPredicate 56 ( 0.8%) 1
|
|
ast-stats-1 Attribute 64 ( 1.0%) 2 32
|
|
ast-stats-1 - Normal 32 ( 0.5%) 1
|
|
ast-stats-1 - DocComment 32 ( 0.5%) 1
|
|
ast-stats-1 Local 80 ( 1.2%) 1 80
|
|
ast-stats-1 ForeignItem 88 ( 1.3%) 1 88
|
|
ast-stats-1 - Fn 88 ( 1.3%) 1
|
|
ast-stats-1 Arm 96 ( 1.4%) 2 48
|
|
ast-stats-1 FnDecl 120 ( 1.8%) 5 24
|
|
ast-stats-1 FieldDef 160 ( 2.4%) 2 80
|
|
ast-stats-1 Stmt 160 ( 2.4%) 5 32
|
|
ast-stats-1 - Let 32 ( 0.5%) 1
|
|
ast-stats-1 - MacCall 32 ( 0.5%) 1
|
|
ast-stats-1 - Expr 96 ( 1.4%) 3
|
|
ast-stats-1 Param 160 ( 2.4%) 4 40
|
|
ast-stats-1 Block 192 ( 2.9%) 6 32
|
|
ast-stats-1 Variant 208 ( 3.1%) 2 104
|
|
ast-stats-1 GenericBound 352 ( 5.3%) 4 88
|
|
ast-stats-1 - Trait 352 ( 5.3%) 4
|
|
ast-stats-1 AssocItem 352 ( 5.3%) 4 88
|
|
ast-stats-1 - Type 176 ( 2.7%) 2
|
|
ast-stats-1 - Fn 176 ( 2.7%) 2
|
|
ast-stats-1 GenericParam 480 ( 7.2%) 5 96
|
|
ast-stats-1 Pat 504 ( 7.6%) 7 72
|
|
ast-stats-1 - Struct 72 ( 1.1%) 1
|
|
ast-stats-1 - Wild 72 ( 1.1%) 1
|
|
ast-stats-1 - Ident 360 ( 5.4%) 5
|
|
ast-stats-1 Expr 576 ( 8.7%) 8 72
|
|
ast-stats-1 - Path 72 ( 1.1%) 1
|
|
ast-stats-1 - Match 72 ( 1.1%) 1
|
|
ast-stats-1 - Struct 72 ( 1.1%) 1
|
|
ast-stats-1 - Lit 144 ( 2.2%) 2
|
|
ast-stats-1 - Block 216 ( 3.3%) 3
|
|
ast-stats-1 PathSegment 744 (11.2%) 31 24
|
|
ast-stats-1 Ty 896 (13.5%) 14 64
|
|
ast-stats-1 - Ptr 64 ( 1.0%) 1
|
|
ast-stats-1 - Ref 64 ( 1.0%) 1
|
|
ast-stats-1 - ImplicitSelf 128 ( 1.9%) 2
|
|
ast-stats-1 - Path 640 ( 9.6%) 10
|
|
ast-stats-1 Item 1_224 (18.4%) 9 136
|
|
ast-stats-1 - Trait 136 ( 2.0%) 1
|
|
ast-stats-1 - Enum 136 ( 2.0%) 1
|
|
ast-stats-1 - ForeignMod 136 ( 2.0%) 1
|
|
ast-stats-1 - Impl 136 ( 2.0%) 1
|
|
ast-stats-1 - Fn 272 ( 4.1%) 2
|
|
ast-stats-1 - Use 408 ( 6.1%) 3
|
|
ast-stats-1 ----------------------------------------------------------------
|
|
ast-stats-1 Total 6_640
|
|
ast-stats-1
|
|
ast-stats-2 POST EXPANSION AST STATS
|
|
ast-stats-2 Name Accumulated Size Count Item Size
|
|
ast-stats-2 ----------------------------------------------------------------
|
|
ast-stats-2 GenericArgs 40 ( 0.5%) 1 40
|
|
ast-stats-2 - AngleBracketed 40 ( 0.5%) 1
|
|
ast-stats-2 Crate 40 ( 0.5%) 1 40
|
|
ast-stats-2 ExprField 48 ( 0.7%) 1 48
|
|
ast-stats-2 WherePredicate 56 ( 0.8%) 1 56
|
|
ast-stats-2 - BoundPredicate 56 ( 0.8%) 1
|
|
ast-stats-2 Local 80 ( 1.1%) 1 80
|
|
ast-stats-2 ForeignItem 88 ( 1.2%) 1 88
|
|
ast-stats-2 - Fn 88 ( 1.2%) 1
|
|
ast-stats-2 Arm 96 ( 1.3%) 2 48
|
|
ast-stats-2 InlineAsm 120 ( 1.6%) 1 120
|
|
ast-stats-2 FnDecl 120 ( 1.6%) 5 24
|
|
ast-stats-2 Attribute 128 ( 1.8%) 4 32
|
|
ast-stats-2 - DocComment 32 ( 0.4%) 1
|
|
ast-stats-2 - Normal 96 ( 1.3%) 3
|
|
ast-stats-2 FieldDef 160 ( 2.2%) 2 80
|
|
ast-stats-2 Stmt 160 ( 2.2%) 5 32
|
|
ast-stats-2 - Let 32 ( 0.4%) 1
|
|
ast-stats-2 - Semi 32 ( 0.4%) 1
|
|
ast-stats-2 - Expr 96 ( 1.3%) 3
|
|
ast-stats-2 Param 160 ( 2.2%) 4 40
|
|
ast-stats-2 Block 192 ( 2.6%) 6 32
|
|
ast-stats-2 Variant 208 ( 2.9%) 2 104
|
|
ast-stats-2 GenericBound 352 ( 4.8%) 4 88
|
|
ast-stats-2 - Trait 352 ( 4.8%) 4
|
|
ast-stats-2 AssocItem 352 ( 4.8%) 4 88
|
|
ast-stats-2 - Type 176 ( 2.4%) 2
|
|
ast-stats-2 - Fn 176 ( 2.4%) 2
|
|
ast-stats-2 GenericParam 480 ( 6.6%) 5 96
|
|
ast-stats-2 Pat 504 ( 6.9%) 7 72
|
|
ast-stats-2 - Struct 72 ( 1.0%) 1
|
|
ast-stats-2 - Wild 72 ( 1.0%) 1
|
|
ast-stats-2 - Ident 360 ( 4.9%) 5
|
|
ast-stats-2 Expr 648 ( 8.9%) 9 72
|
|
ast-stats-2 - Path 72 ( 1.0%) 1
|
|
ast-stats-2 - Match 72 ( 1.0%) 1
|
|
ast-stats-2 - Struct 72 ( 1.0%) 1
|
|
ast-stats-2 - InlineAsm 72 ( 1.0%) 1
|
|
ast-stats-2 - Lit 144 ( 2.0%) 2
|
|
ast-stats-2 - Block 216 ( 3.0%) 3
|
|
ast-stats-2 PathSegment 864 (11.9%) 36 24
|
|
ast-stats-2 Ty 896 (12.3%) 14 64
|
|
ast-stats-2 - Ptr 64 ( 0.9%) 1
|
|
ast-stats-2 - Ref 64 ( 0.9%) 1
|
|
ast-stats-2 - ImplicitSelf 128 ( 1.8%) 2
|
|
ast-stats-2 - Path 640 ( 8.8%) 10
|
|
ast-stats-2 Item 1_496 (20.5%) 11 136
|
|
ast-stats-2 - Trait 136 ( 1.9%) 1
|
|
ast-stats-2 - Enum 136 ( 1.9%) 1
|
|
ast-stats-2 - ExternCrate 136 ( 1.9%) 1
|
|
ast-stats-2 - ForeignMod 136 ( 1.9%) 1
|
|
ast-stats-2 - Impl 136 ( 1.9%) 1
|
|
ast-stats-2 - Fn 272 ( 3.7%) 2
|
|
ast-stats-2 - Use 544 ( 7.5%) 4
|
|
ast-stats-2 ----------------------------------------------------------------
|
|
ast-stats-2 Total 7_288
|
|
ast-stats-2
|
|
hir-stats HIR STATS
|
|
hir-stats Name Accumulated Size Count Item Size
|
|
hir-stats ----------------------------------------------------------------
|
|
hir-stats ForeignItemRef 24 ( 0.3%) 1 24
|
|
hir-stats Lifetime 24 ( 0.3%) 1 24
|
|
hir-stats Mod 32 ( 0.4%) 1 32
|
|
hir-stats ExprField 40 ( 0.4%) 1 40
|
|
hir-stats TraitItemRef 56 ( 0.6%) 2 28
|
|
hir-stats GenericArg 64 ( 0.7%) 4 16
|
|
hir-stats - Type 16 ( 0.2%) 1
|
|
hir-stats - Lifetime 48 ( 0.5%) 3
|
|
hir-stats Local 64 ( 0.7%) 1 64
|
|
hir-stats Param 64 ( 0.7%) 2 32
|
|
hir-stats Body 72 ( 0.8%) 3 24
|
|
hir-stats InlineAsm 72 ( 0.8%) 1 72
|
|
hir-stats ImplItemRef 72 ( 0.8%) 2 36
|
|
hir-stats Arm 80 ( 0.9%) 2 40
|
|
hir-stats FieldDef 96 ( 1.1%) 2 48
|
|
hir-stats Stmt 96 ( 1.1%) 3 32
|
|
hir-stats - Let 32 ( 0.4%) 1
|
|
hir-stats - Semi 32 ( 0.4%) 1
|
|
hir-stats - Expr 32 ( 0.4%) 1
|
|
hir-stats FnDecl 120 ( 1.3%) 3 40
|
|
hir-stats Attribute 128 ( 1.4%) 4 32
|
|
hir-stats Variant 144 ( 1.6%) 2 72
|
|
hir-stats GenericArgs 144 ( 1.6%) 3 48
|
|
hir-stats GenericBound 192 ( 2.1%) 4 48
|
|
hir-stats - Trait 192 ( 2.1%) 4
|
|
hir-stats WherePredicate 192 ( 2.1%) 3 64
|
|
hir-stats - BoundPredicate 192 ( 2.1%) 3
|
|
hir-stats Block 288 ( 3.2%) 6 48
|
|
hir-stats GenericParam 360 ( 4.0%) 5 72
|
|
hir-stats Pat 360 ( 4.0%) 5 72
|
|
hir-stats - Wild 72 ( 0.8%) 1
|
|
hir-stats - Struct 72 ( 0.8%) 1
|
|
hir-stats - Binding 216 ( 2.4%) 3
|
|
hir-stats Generics 560 ( 6.2%) 10 56
|
|
hir-stats Ty 720 ( 8.0%) 15 48
|
|
hir-stats - Ptr 48 ( 0.5%) 1
|
|
hir-stats - Ref 48 ( 0.5%) 1
|
|
hir-stats - Path 624 ( 7.0%) 13
|
|
hir-stats Expr 768 ( 8.6%) 12 64
|
|
hir-stats - Path 64 ( 0.7%) 1
|
|
hir-stats - Struct 64 ( 0.7%) 1
|
|
hir-stats - Match 64 ( 0.7%) 1
|
|
hir-stats - InlineAsm 64 ( 0.7%) 1
|
|
hir-stats - Lit 128 ( 1.4%) 2
|
|
hir-stats - Block 384 ( 4.3%) 6
|
|
hir-stats Item 968 (10.8%) 11 88
|
|
hir-stats - Trait 88 ( 1.0%) 1
|
|
hir-stats - Enum 88 ( 1.0%) 1
|
|
hir-stats - ExternCrate 88 ( 1.0%) 1
|
|
hir-stats - ForeignMod 88 ( 1.0%) 1
|
|
hir-stats - Impl 88 ( 1.0%) 1
|
|
hir-stats - Fn 176 ( 2.0%) 2
|
|
hir-stats - Use 352 ( 3.9%) 4
|
|
hir-stats Path 1_240 (13.8%) 31 40
|
|
hir-stats PathSegment 1_920 (21.4%) 40 48
|
|
hir-stats ----------------------------------------------------------------
|
|
hir-stats Total 8_960
|
|
hir-stats
|