Skip to content

Commit 8d3ed08

Browse files
committed
Store a flat list of patterns in Thir (not yet used)
1 parent 85bbccd commit 8d3ed08

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

compiler/rustc_middle/src/thir.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ thir_with_elements! {
8888
exprs: ExprId => Expr<'tcx> => "e{}",
8989
stmts: StmtId => Stmt<'tcx> => "s{}",
9090
params: ParamId => Param<'tcx> => "p{}",
91+
pats: PatId => Pat<'tcx> => "pat{}",
9192
}
9293

9394
#[derive(Debug, HashStable)]

tests/ui/thir-print/thir-flat-const-variant.stdout

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Thir {
8181
],
8282
stmts: [],
8383
params: [],
84+
pats: [],
8485
}
8586

8687
DefId(0:9 ~ thir_flat_const_variant[1f54]::{impl#0}::BAR2):
@@ -166,6 +167,7 @@ Thir {
166167
],
167168
stmts: [],
168169
params: [],
170+
pats: [],
169171
}
170172

171173
DefId(0:10 ~ thir_flat_const_variant[1f54]::{impl#0}::BAR3):
@@ -251,6 +253,7 @@ Thir {
251253
],
252254
stmts: [],
253255
params: [],
256+
pats: [],
254257
}
255258

256259
DefId(0:11 ~ thir_flat_const_variant[1f54]::{impl#0}::BAR4):
@@ -336,6 +339,7 @@ Thir {
336339
],
337340
stmts: [],
338341
params: [],
342+
pats: [],
339343
}
340344

341345
DefId(0:12 ~ thir_flat_const_variant[1f54]::main):
@@ -388,5 +392,6 @@ Thir {
388392
],
389393
stmts: [],
390394
params: [],
395+
pats: [],
391396
}
392397

tests/ui/thir-print/thir-flat.stdout

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ Thir {
4848
],
4949
stmts: [],
5050
params: [],
51+
pats: [],
5152
}
5253

0 commit comments

Comments
 (0)