Skip to content

Commit dd01122

Browse files
committedAug 20, 2022
Auto merge of #100564 - nnethercote:box-ast-MacCall, r=spastorino
Box the `MacCall` in various types. r? `@spastorino`
2 parents 36e530c + eafd0df commit dd01122

File tree

12 files changed

+94
-94
lines changed

12 files changed

+94
-94
lines changed
 

‎compiler/rustc_ast/src/ast.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ pub enum PatKind {
770770
Paren(P<Pat>),
771771

772772
/// A macro pattern; pre-expansion.
773-
MacCall(MacCall),
773+
MacCall(P<MacCall>),
774774
}
775775

776776
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Copy)]
@@ -980,7 +980,7 @@ pub enum StmtKind {
980980

981981
#[derive(Clone, Encodable, Decodable, Debug)]
982982
pub struct MacCallStmt {
983-
pub mac: MacCall,
983+
pub mac: P<MacCall>,
984984
pub style: MacStmtStyle,
985985
pub attrs: AttrVec,
986986
pub tokens: Option<LazyTokenStream>,
@@ -1437,7 +1437,7 @@ pub enum ExprKind {
14371437
InlineAsm(P<InlineAsm>),
14381438

14391439
/// A macro invocation; pre-expansion.
1440-
MacCall(MacCall),
1440+
MacCall(P<MacCall>),
14411441

14421442
/// A struct literal expression.
14431443
///
@@ -2040,7 +2040,7 @@ pub enum TyKind {
20402040
/// Inferred type of a `self` or `&self` argument in a method.
20412041
ImplicitSelf,
20422042
/// A macro in the type position.
2043-
MacCall(MacCall),
2043+
MacCall(P<MacCall>),
20442044
/// Placeholder for a kind that has failed to be defined.
20452045
Err,
20462046
/// Placeholder for a `va_list`.
@@ -2877,7 +2877,7 @@ pub enum ItemKind {
28772877
/// A macro invocation.
28782878
///
28792879
/// E.g., `foo!(..)`.
2880-
MacCall(MacCall),
2880+
MacCall(P<MacCall>),
28812881

28822882
/// A macro definition.
28832883
MacroDef(MacroDef),
@@ -2951,7 +2951,7 @@ pub enum AssocItemKind {
29512951
/// An associated type.
29522952
TyAlias(Box<TyAlias>),
29532953
/// A macro expanding to associated items.
2954-
MacCall(MacCall),
2954+
MacCall(P<MacCall>),
29552955
}
29562956

29572957
impl AssocItemKind {
@@ -3000,7 +3000,7 @@ pub enum ForeignItemKind {
30003000
/// An foreign type.
30013001
TyAlias(Box<TyAlias>),
30023002
/// A macro expanding to foreign items.
3003-
MacCall(MacCall),
3003+
MacCall(P<MacCall>),
30043004
}
30053005

30063006
impl From<ForeignItemKind> for ItemKind {
@@ -3036,15 +3036,15 @@ mod size_asserts {
30363036
use super::*;
30373037
use rustc_data_structures::static_assert_size;
30383038
// These are in alphabetical order, which is easy to maintain.
3039-
static_assert_size!(AssocItem, 160);
3040-
static_assert_size!(AssocItemKind, 72);
3039+
static_assert_size!(AssocItem, 120);
3040+
static_assert_size!(AssocItemKind, 32);
30413041
static_assert_size!(Attribute, 32);
30423042
static_assert_size!(Block, 48);
30433043
static_assert_size!(Expr, 104);
30443044
static_assert_size!(ExprKind, 72);
30453045
static_assert_size!(Fn, 192);
3046-
static_assert_size!(ForeignItem, 160);
3047-
static_assert_size!(ForeignItemKind, 72);
3046+
static_assert_size!(ForeignItem, 112);
3047+
static_assert_size!(ForeignItemKind, 24);
30483048
static_assert_size!(GenericBound, 88);
30493049
static_assert_size!(Generics, 72);
30503050
static_assert_size!(Impl, 200);

‎compiler/rustc_builtin_macros/src/assert.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ pub fn expand_assert<'cx>(
5252
let expr = if let Some(tokens) = custom_message {
5353
let then = cx.expr(
5454
call_site_span,
55-
ExprKind::MacCall(MacCall {
55+
ExprKind::MacCall(P(MacCall {
5656
path: panic_path(),
5757
args: P(MacArgs::Delimited(
5858
DelimSpan::from_single(call_site_span),
5959
MacDelimiter::Parenthesis,
6060
tokens,
6161
)),
6262
prior_type_ascription: None,
63-
}),
63+
})),
6464
);
6565
expr_if_not(cx, call_site_span, cond_expr, then, None)
6666
}

‎compiler/rustc_builtin_macros/src/assert/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,15 @@ impl<'cx, 'a> Context<'cx, 'a> {
177177
});
178178
self.cx.expr(
179179
self.span,
180-
ExprKind::MacCall(MacCall {
180+
ExprKind::MacCall(P(MacCall {
181181
path: panic_path,
182182
args: P(MacArgs::Delimited(
183183
DelimSpan::from_single(self.span),
184184
MacDelimiter::Parenthesis,
185185
initial.into_iter().chain(captures).collect::<TokenStream>(),
186186
)),
187187
prior_type_ascription: None,
188-
}),
188+
})),
189189
)
190190
}
191191

‎compiler/rustc_builtin_macros/src/edition_panic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn expand<'cx>(
4848
MacEager::expr(
4949
cx.expr(
5050
sp,
51-
ExprKind::MacCall(MacCall {
51+
ExprKind::MacCall(P(MacCall {
5252
path: Path {
5353
span: sp,
5454
segments: cx
@@ -64,7 +64,7 @@ fn expand<'cx>(
6464
tts,
6565
)),
6666
prior_type_ascription: None,
67-
}),
67+
})),
6868
),
6969
)
7070
}

‎compiler/rustc_expand/src/expand.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ pub struct Invocation {
306306

307307
pub enum InvocationKind {
308308
Bang {
309-
mac: ast::MacCall,
309+
mac: P<ast::MacCall>,
310310
span: Span,
311311
},
312312
Attr {
@@ -1017,7 +1017,7 @@ trait InvocationCollectorNode: HasAttrs + HasNodeId + Sized {
10171017
fn is_mac_call(&self) -> bool {
10181018
false
10191019
}
1020-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1020+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
10211021
unreachable!()
10221022
}
10231023
fn pre_flat_map_node_collect_attr(_cfg: &StripUnconfigured<'_>, _attr: &ast::Attribute) {}
@@ -1046,7 +1046,7 @@ impl InvocationCollectorNode for P<ast::Item> {
10461046
fn is_mac_call(&self) -> bool {
10471047
matches!(self.kind, ItemKind::MacCall(..))
10481048
}
1049-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1049+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
10501050
let node = self.into_inner();
10511051
match node.kind {
10521052
ItemKind::MacCall(mac) => (mac, node.attrs, AddSemicolon::No),
@@ -1154,7 +1154,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, TraitItemTag>
11541154
fn is_mac_call(&self) -> bool {
11551155
matches!(self.wrapped.kind, AssocItemKind::MacCall(..))
11561156
}
1157-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1157+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
11581158
let item = self.wrapped.into_inner();
11591159
match item.kind {
11601160
AssocItemKind::MacCall(mac) => (mac, item.attrs, AddSemicolon::No),
@@ -1179,7 +1179,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, ImplItemTag>
11791179
fn is_mac_call(&self) -> bool {
11801180
matches!(self.wrapped.kind, AssocItemKind::MacCall(..))
11811181
}
1182-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1182+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
11831183
let item = self.wrapped.into_inner();
11841184
match item.kind {
11851185
AssocItemKind::MacCall(mac) => (mac, item.attrs, AddSemicolon::No),
@@ -1202,7 +1202,7 @@ impl InvocationCollectorNode for P<ast::ForeignItem> {
12021202
fn is_mac_call(&self) -> bool {
12031203
matches!(self.kind, ForeignItemKind::MacCall(..))
12041204
}
1205-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1205+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
12061206
let node = self.into_inner();
12071207
match node.kind {
12081208
ForeignItemKind::MacCall(mac) => (mac, node.attrs, AddSemicolon::No),
@@ -1323,7 +1323,7 @@ impl InvocationCollectorNode for ast::Stmt {
13231323
StmtKind::Local(..) | StmtKind::Empty => false,
13241324
}
13251325
}
1326-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1326+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
13271327
// We pull macro invocations (both attributes and fn-like macro calls) out of their
13281328
// `StmtKind`s and treat them as statement macro invocations, not as items or expressions.
13291329
let (add_semicolon, mac, attrs) = match self.kind {
@@ -1387,7 +1387,7 @@ impl InvocationCollectorNode for P<ast::Ty> {
13871387
fn is_mac_call(&self) -> bool {
13881388
matches!(self.kind, ast::TyKind::MacCall(..))
13891389
}
1390-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1390+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
13911391
let node = self.into_inner();
13921392
match node.kind {
13931393
TyKind::MacCall(mac) => (mac, Vec::new(), AddSemicolon::No),
@@ -1411,7 +1411,7 @@ impl InvocationCollectorNode for P<ast::Pat> {
14111411
fn is_mac_call(&self) -> bool {
14121412
matches!(self.kind, PatKind::MacCall(..))
14131413
}
1414-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1414+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
14151415
let node = self.into_inner();
14161416
match node.kind {
14171417
PatKind::MacCall(mac) => (mac, Vec::new(), AddSemicolon::No),
@@ -1439,7 +1439,7 @@ impl InvocationCollectorNode for P<ast::Expr> {
14391439
fn is_mac_call(&self) -> bool {
14401440
matches!(self.kind, ExprKind::MacCall(..))
14411441
}
1442-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1442+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
14431443
let node = self.into_inner();
14441444
match node.kind {
14451445
ExprKind::MacCall(mac) => (mac, node.attrs, AddSemicolon::No),
@@ -1466,7 +1466,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::Expr>, OptExprTag> {
14661466
fn is_mac_call(&self) -> bool {
14671467
matches!(self.wrapped.kind, ast::ExprKind::MacCall(..))
14681468
}
1469-
fn take_mac_call(self) -> (ast::MacCall, Self::AttrsTy, AddSemicolon) {
1469+
fn take_mac_call(self) -> (P<ast::MacCall>, Self::AttrsTy, AddSemicolon) {
14701470
let node = self.wrapped.into_inner();
14711471
match node.kind {
14721472
ExprKind::MacCall(mac) => (mac, node.attrs, AddSemicolon::No),
@@ -1512,7 +1512,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
15121512
placeholder(fragment_kind, NodeId::placeholder_from_expn_id(expn_id), vis)
15131513
}
15141514

1515-
fn collect_bang(&mut self, mac: ast::MacCall, kind: AstFragmentKind) -> AstFragment {
1515+
fn collect_bang(&mut self, mac: P<ast::MacCall>, kind: AstFragmentKind) -> AstFragment {
15161516
// cache the macro call span so that it can be
15171517
// easily adjusted for incremental compilation
15181518
let span = mac.span();

‎compiler/rustc_expand/src/placeholders.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ pub fn placeholder(
1515
id: ast::NodeId,
1616
vis: Option<ast::Visibility>,
1717
) -> AstFragment {
18-
fn mac_placeholder() -> ast::MacCall {
19-
ast::MacCall {
18+
fn mac_placeholder() -> P<ast::MacCall> {
19+
P(ast::MacCall {
2020
path: ast::Path { span: DUMMY_SP, segments: Vec::new(), tokens: None },
2121
args: P(ast::MacArgs::Empty),
2222
prior_type_ascription: None,
23-
}
23+
})
2424
}
2525

2626
let ident = Ident::empty();

‎compiler/rustc_parse/src/parser/expr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1492,11 +1492,11 @@ impl<'a> Parser<'a> {
14921492
self.struct_span_err(path.span, "macros cannot use qualified paths").emit();
14931493
}
14941494
let lo = path.span;
1495-
let mac = MacCall {
1495+
let mac = P(MacCall {
14961496
path,
14971497
args: self.parse_mac_args()?,
14981498
prior_type_ascription: self.last_type_ascription,
1499-
};
1499+
});
15001500
(lo.to(self.prev_token.span), ExprKind::MacCall(mac))
15011501
} else if self.check(&token::OpenDelim(Delimiter::Brace)) &&
15021502
let Some(expr) = self.maybe_parse_struct_expr(qself.as_ref(), &path) {

‎compiler/rustc_parse/src/parser/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ impl<'a> Parser<'a> {
287287
return Ok(None);
288288
} else if macros_allowed && self.check_path() {
289289
// MACRO INVOCATION ITEM
290-
(Ident::empty(), ItemKind::MacCall(self.parse_item_macro(vis)?))
290+
(Ident::empty(), ItemKind::MacCall(P(self.parse_item_macro(vis)?)))
291291
} else {
292292
return Ok(None);
293293
};

‎compiler/rustc_parse/src/parser/pat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ impl<'a> Parser<'a> {
665665
fn parse_pat_mac_invoc(&mut self, path: Path) -> PResult<'a, PatKind> {
666666
self.bump();
667667
let args = self.parse_mac_args()?;
668-
let mac = MacCall { path, args, prior_type_ascription: self.last_type_ascription };
668+
let mac = P(MacCall { path, args, prior_type_ascription: self.last_type_ascription });
669669
Ok(PatKind::MacCall(mac))
670670
}
671671

‎compiler/rustc_parse/src/parser/stmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl<'a> Parser<'a> {
177177
None => unreachable!(),
178178
};
179179

180-
let mac = MacCall { path, args, prior_type_ascription: self.last_type_ascription };
180+
let mac = P(MacCall { path, args, prior_type_ascription: self.last_type_ascription });
181181

182182
let kind = if (style == MacStmtStyle::Braces
183183
&& self.token != token::Dot

‎compiler/rustc_parse/src/parser/ty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,11 @@ impl<'a> Parser<'a> {
598598
let path = self.parse_path_inner(PathStyle::Type, ty_generics)?;
599599
if self.eat(&token::Not) {
600600
// Macro invocation in type position
601-
Ok(TyKind::MacCall(MacCall {
601+
Ok(TyKind::MacCall(P(MacCall {
602602
path,
603603
args: self.parse_mac_args()?,
604604
prior_type_ascription: self.last_type_ascription,
605-
}))
605+
})))
606606
} else if allow_plus == AllowPlus::Yes && self.check_plus() {
607607
// `Trait1 + Trait2 + 'a`
608608
self.parse_remaining_bounds_path(Vec::new(), path, lo, true)

‎src/test/ui/stats/hir-stats.stderr

+55-55
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ PRE EXPANSION AST STATS
33

44
Name Accumulated Size Count Item Size
55
----------------------------------------------------------------
6-
ExprField 48 ( 0.5%) 1 48
6+
ExprField 48 ( 0.6%) 1 48
77
Attribute 64 ( 0.7%) 2 32
88
- Normal 32 ( 0.4%) 1
99
- DocComment 32 ( 0.4%) 1
@@ -14,48 +14,48 @@ WherePredicate 72 ( 0.8%) 1 72
1414
- BoundPredicate 72 ( 0.8%) 1
1515
Crate 72 ( 0.8%) 1 72
1616
Arm 96 ( 1.1%) 2 48
17+
ForeignItem 112 ( 1.3%) 1 112
18+
- Fn 112 ( 1.3%) 1
1719
FieldDef 160 ( 1.8%) 2 80
18-
ForeignItem 160 ( 1.8%) 1 160
19-
- Fn 160 ( 1.8%) 1
2020
Stmt 160 ( 1.8%) 5 32
2121
- Local 32 ( 0.4%) 1
2222
- MacCall 32 ( 0.4%) 1
2323
- Expr 96 ( 1.1%) 3
2424
Param 160 ( 1.8%) 4 40
25-
FnDecl 200 ( 2.2%) 5 40
26-
Variant 240 ( 2.7%) 2 120
27-
Block 288 ( 3.2%) 6 48
25+
FnDecl 200 ( 2.3%) 5 40
26+
Variant 240 ( 2.8%) 2 120
27+
Block 288 ( 3.3%) 6 48
2828
GenericBound 352 ( 4.0%) 4 88
2929
- Trait 352 ( 4.0%) 4
30-
GenericParam 520 ( 5.8%) 5 104
31-
AssocItem 640 ( 7.2%) 4 160
32-
- TyAlias 320 ( 3.6%) 2
33-
- Fn 320 ( 3.6%) 2
34-
PathSegment 720 ( 8.1%) 30 24
35-
Expr 832 ( 9.3%) 8 104
30+
AssocItem 480 ( 5.5%) 4 120
31+
- TyAlias 240 ( 2.8%) 2
32+
- Fn 240 ( 2.8%) 2
33+
GenericParam 520 ( 6.0%) 5 104
34+
PathSegment 720 ( 8.3%) 30 24
35+
Expr 832 ( 9.6%) 8 104
3636
- Path 104 ( 1.2%) 1
3737
- Match 104 ( 1.2%) 1
3838
- Struct 104 ( 1.2%) 1
39-
- Lit 208 ( 2.3%) 2
40-
- Block 312 ( 3.5%) 3
41-
Pat 840 ( 9.4%) 7 120
42-
- Struct 120 ( 1.3%) 1
43-
- Wild 120 ( 1.3%) 1
44-
- Ident 600 ( 6.7%) 5
45-
Ty 1_344 (15.1%) 14 96
39+
- Lit 208 ( 2.4%) 2
40+
- Block 312 ( 3.6%) 3
41+
Pat 840 ( 9.7%) 7 120
42+
- Struct 120 ( 1.4%) 1
43+
- Wild 120 ( 1.4%) 1
44+
- Ident 600 ( 6.9%) 5
45+
Ty 1_344 (15.5%) 14 96
4646
- Rptr 96 ( 1.1%) 1
4747
- Ptr 96 ( 1.1%) 1
4848
- ImplicitSelf 192 ( 2.2%) 2
49-
- Path 960 (10.8%) 10
50-
Item 1_800 (20.2%) 9 200
51-
- Trait 200 ( 2.2%) 1
52-
- Enum 200 ( 2.2%) 1
53-
- ForeignMod 200 ( 2.2%) 1
54-
- Impl 200 ( 2.2%) 1
55-
- Fn 400 ( 4.5%) 2
56-
- Use 600 ( 6.7%) 3
49+
- Path 960 (11.0%) 10
50+
Item 1_800 (20.7%) 9 200
51+
- Trait 200 ( 2.3%) 1
52+
- Enum 200 ( 2.3%) 1
53+
- ForeignMod 200 ( 2.3%) 1
54+
- Impl 200 ( 2.3%) 1
55+
- Fn 400 ( 4.6%) 2
56+
- Use 600 ( 6.9%) 3
5757
----------------------------------------------------------------
58-
Total 8_904
58+
Total 8_696
5959

6060

6161
POST EXPANSION AST STATS
@@ -65,18 +65,18 @@ Name Accumulated Size Count Item Size
6565
ExprField 48 ( 0.5%) 1 48
6666
GenericArgs 64 ( 0.7%) 1 64
6767
- AngleBracketed 64 ( 0.7%) 1
68-
Local 72 ( 0.7%) 1 72
69-
WherePredicate 72 ( 0.7%) 1 72
70-
- BoundPredicate 72 ( 0.7%) 1
71-
Crate 72 ( 0.7%) 1 72
68+
Local 72 ( 0.8%) 1 72
69+
WherePredicate 72 ( 0.8%) 1 72
70+
- BoundPredicate 72 ( 0.8%) 1
71+
Crate 72 ( 0.8%) 1 72
7272
Arm 96 ( 1.0%) 2 48
73-
InlineAsm 120 ( 1.2%) 1 120
74-
Attribute 128 ( 1.3%) 4 32
73+
ForeignItem 112 ( 1.2%) 1 112
74+
- Fn 112 ( 1.2%) 1
75+
InlineAsm 120 ( 1.3%) 1 120
76+
Attribute 128 ( 1.4%) 4 32
7577
- DocComment 32 ( 0.3%) 1
7678
- Normal 96 ( 1.0%) 3
7779
FieldDef 160 ( 1.7%) 2 80
78-
ForeignItem 160 ( 1.7%) 1 160
79-
- Fn 160 ( 1.7%) 1
8080
Stmt 160 ( 1.7%) 5 32
8181
- Local 32 ( 0.3%) 1
8282
- Semi 32 ( 0.3%) 1
@@ -85,39 +85,39 @@ Param 160 ( 1.7%) 4 40
8585
FnDecl 200 ( 2.1%) 5 40
8686
Variant 240 ( 2.5%) 2 120
8787
Block 288 ( 3.0%) 6 48
88-
GenericBound 352 ( 3.6%) 4 88
89-
- Trait 352 ( 3.6%) 4
90-
GenericParam 520 ( 5.4%) 5 104
91-
AssocItem 640 ( 6.6%) 4 160
92-
- TyAlias 320 ( 3.3%) 2
93-
- Fn 320 ( 3.3%) 2
94-
PathSegment 792 ( 8.2%) 33 24
95-
Pat 840 ( 8.7%) 7 120
96-
- Struct 120 ( 1.2%) 1
97-
- Wild 120 ( 1.2%) 1
98-
- Ident 600 ( 6.2%) 5
99-
Expr 936 ( 9.7%) 9 104
88+
GenericBound 352 ( 3.7%) 4 88
89+
- Trait 352 ( 3.7%) 4
90+
AssocItem 480 ( 5.1%) 4 120
91+
- TyAlias 240 ( 2.5%) 2
92+
- Fn 240 ( 2.5%) 2
93+
GenericParam 520 ( 5.5%) 5 104
94+
PathSegment 792 ( 8.4%) 33 24
95+
Pat 840 ( 8.9%) 7 120
96+
- Struct 120 ( 1.3%) 1
97+
- Wild 120 ( 1.3%) 1
98+
- Ident 600 ( 6.3%) 5
99+
Expr 936 ( 9.9%) 9 104
100100
- Path 104 ( 1.1%) 1
101101
- Match 104 ( 1.1%) 1
102102
- Struct 104 ( 1.1%) 1
103103
- InlineAsm 104 ( 1.1%) 1
104104
- Lit 208 ( 2.2%) 2
105-
- Block 312 ( 3.2%) 3
106-
Ty 1_344 (13.9%) 14 96
105+
- Block 312 ( 3.3%) 3
106+
Ty 1_344 (14.2%) 14 96
107107
- Rptr 96 ( 1.0%) 1
108108
- Ptr 96 ( 1.0%) 1
109109
- ImplicitSelf 192 ( 2.0%) 2
110-
- Path 960 ( 9.9%) 10
111-
Item 2_200 (22.8%) 11 200
110+
- Path 960 (10.2%) 10
111+
Item 2_200 (23.3%) 11 200
112112
- Trait 200 ( 2.1%) 1
113113
- Enum 200 ( 2.1%) 1
114114
- ExternCrate 200 ( 2.1%) 1
115115
- ForeignMod 200 ( 2.1%) 1
116116
- Impl 200 ( 2.1%) 1
117-
- Fn 400 ( 4.1%) 2
118-
- Use 800 ( 8.3%) 4
117+
- Fn 400 ( 4.2%) 2
118+
- Use 800 ( 8.5%) 4
119119
----------------------------------------------------------------
120-
Total 9_664
120+
Total 9_456
121121

122122

123123
HIR STATS

0 commit comments

Comments
 (0)
Please sign in to comment.