Skip to content

Commit 41b3fdf

Browse files
committed
Store a flat list of patterns in Thir (not yet used)
1 parent a719c1b commit 41b3fdf

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

compiler/rustc_middle/src/thir.rs

+1
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)]

compiler/rustc_middle/src/ty/structural_impls.rs

+1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ TrivialTypeTraversalImpls! {
261261
crate::mir::SourceScope,
262262
crate::mir::SourceScopeLocalData,
263263
crate::mir::SwitchTargets,
264+
crate::thir::PatId,
264265
crate::traits::IsConstable,
265266
crate::traits::OverflowError,
266267
crate::ty::abstract_const::NotConstEvaluatable,

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

+5
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

+1
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)