Skip to content

Commit 3e0a1c0

Browse files
committed
Auto merge of #67592 - matthewjasper:cleanup-match, r=Centril
Prepare for lowering or-patterns This is probably best reviewed commit-by-commit. * Rustfmt `rustc_mir::build::{self, matches}` * Remove `-Znll-dont-emit-read-for-match` * Split `match_expr` into smaller functions * Feature gate or-patterns in const contexts cc #54883 r? @Centril
2 parents 3ac40b6 + 0a14cbe commit 3e0a1c0

File tree

7 files changed

+276
-135
lines changed

7 files changed

+276
-135
lines changed

Diff for: src/librustc/ty/context.rs

-13
Original file line numberDiff line numberDiff line change
@@ -1370,19 +1370,6 @@ impl<'tcx> TyCtxt<'tcx> {
13701370
self.borrowck_mode().migrate()
13711371
}
13721372

1373-
/// If `true`, make MIR codegen for `match` emit a temp that holds a
1374-
/// borrow of the input to the match expression.
1375-
pub fn generate_borrow_of_any_match_input(&self) -> bool {
1376-
self.emit_read_for_match()
1377-
}
1378-
1379-
/// If `true`, make MIR codegen for `match` emit FakeRead
1380-
/// statements (which simulate the maximal effect of executing the
1381-
/// patterns in a match arm).
1382-
pub fn emit_read_for_match(&self) -> bool {
1383-
!self.sess.opts.debugging_opts.nll_dont_emit_read_for_match
1384-
}
1385-
13861373
/// What mode(s) of borrowck should we run? AST? MIR? both?
13871374
/// (Also considers the `#![feature(nll)]` setting.)
13881375
pub fn borrowck_mode(&self) -> BorrowckMode {

0 commit comments

Comments
 (0)