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 6890336 commit bddc1e2Copy full SHA for bddc1e2
compiler/rustc_mir_build/src/builder/matches/match_pair.rs
@@ -339,6 +339,12 @@ impl<'tcx> MatchPairTree<'tcx> {
339
340
if let Some(test_case) = test_case {
341
// This pattern is refutable, so push a new match-pair node.
342
+ //
343
+ // Note: unless test_case is TestCase::Or, place must not be None.
344
+ // This means that the closure capture analysis in
345
+ // rustc_hir_typeck::upvar, and in particular the pattern handling
346
+ // code of ExprUseVisitor, must capture all of the places we'll use.
347
+ // Make sure to keep these two parts in sync!
348
match_pairs.push(MatchPairTree {
349
place,
350
test_case,
0 commit comments