We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16197bd commit 756a0b2Copy full SHA for 756a0b2
compiler/rustc_mir_build/src/builder/matches/match_pair.rs
@@ -300,6 +300,12 @@ impl<'tcx> MatchPairTree<'tcx> {
300
301
if let Some(test_case) = test_case {
302
// This pattern is refutable, so push a new match-pair node.
303
+ //
304
+ // Note: unless test_case is TestCase::Or, place must not be None.
305
+ // This means that the closure capture analysis in
306
+ // rustc_hir_typeck::upvar, and in particular the pattern handling
307
+ // code of ExprUseVisitor, must capture all of the places we'll use.
308
+ // Make sure to keep these two parts in sync!
309
match_pairs.push(MatchPairTree {
310
place,
311
test_case,
0 commit comments