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 972b851 commit 5f73b21Copy full SHA for 5f73b21
compiler/rustc_mir_build/src/builder/matches/match_pair.rs
@@ -293,6 +293,12 @@ impl<'tcx> MatchPairTree<'tcx> {
293
294
if let Some(test_case) = test_case {
295
// This pattern is refutable, so push a new match-pair node.
296
+ //
297
+ // Note: unless test_case is TestCase::Or, place must not be None.
298
+ // This means that the closure capture analysis in
299
+ // rustc_hir_typeck::upvar, and in particular the pattern handling
300
+ // code of ExprUseVisitor, must capture all of the places we'll use.
301
+ // Make sure to keep these two parts in sync!
302
match_pairs.push(MatchPairTree {
303
place,
304
test_case,
0 commit comments