Skip to content

Commit 71e06b9

Browse files
committedFeb 21, 2025
Auto merge of rust-lang#137371 - matthiaskrgr:rollup-3qkdqar, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#128080 (Specify scope in `out_of_scope_macro_calls` lint) - rust-lang#135630 (add more `s390x` target features) - rust-lang#136089 (Reduce `Box::default` stack copies in debug mode) - rust-lang#137204 (Clarify MIR dialects and phases) - rust-lang#137299 (Simplify `Postorder` customization.) - rust-lang#137302 (Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck) - rust-lang#137305 (Tweaks in and around `rustc_middle`) - rust-lang#137313 (Some codegen_llvm cleanups) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 9f48ded + 636f4f1 commit 71e06b9

File tree

44 files changed

+380
-309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+380
-309
lines changed
 

‎compiler/rustc_borrowck/src/polonius/dump.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ fn emit_polonius_mir<'tcx>(
226226
regioncx,
227227
closure_region_requirements,
228228
borrow_set,
229-
pass_where.clone(),
229+
pass_where,
230230
out,
231231
)?;
232232

‎compiler/rustc_borrowck/src/type_check/liveness/trace.rs‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,14 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
613613
// types, so there's no guarantee that it succeeds. We also
614614
// can't rely on the the `ErrorGuaranteed` from `fully_perform` here
615615
// because it comes from delay_span_bug.
616-
let ocx = ObligationCtxt::new_with_diagnostics(&typeck.infcx);
617-
let errors =
618-
match dropck_outlives::compute_dropck_outlives_with_errors(&ocx, op, span) {
616+
//
617+
// Do this inside of a probe because we don't particularly care (or want)
618+
// any region side-effects of this operation in our infcx.
619+
typeck.infcx.probe(|_| {
620+
let ocx = ObligationCtxt::new_with_diagnostics(&typeck.infcx);
621+
let errors = match dropck_outlives::compute_dropck_outlives_with_errors(
622+
&ocx, op, span,
623+
) {
619624
Ok(_) => ocx.select_all_or_error(),
620625
Err(e) => {
621626
if e.is_empty() {
@@ -626,11 +631,12 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
626631
}
627632
};
628633

629-
if !errors.is_empty() {
630-
typeck.infcx.err_ctxt().report_fulfillment_errors(errors);
631-
} else {
632-
span_bug!(span, "Rerunning drop data query produced no error.");
633-
}
634+
if !errors.is_empty() {
635+
typeck.infcx.err_ctxt().report_fulfillment_errors(errors);
636+
} else {
637+
span_bug!(span, "Rerunning drop data query produced no error.");
638+
}
639+
});
634640
DropData { dropck_result: Default::default(), region_constraint_data: None }
635641
}
636642
}

0 commit comments

Comments
 (0)
Please sign in to comment.