Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 151256b

Browse files
committedOct 24, 2023
Auto merge of #117135 - matthiaskrgr:rollup-zdh18i6, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #116094 (Introduce `-C instrument-coverage=branch` to gate branch coverage) - #116396 (Migrate diagnostics in `rustc_hir_analysis/src/coherence/orphan.rs`) - #116714 (Derive `Ord`, `PartialOrd` and `Hash` for `SocketAddr*`) - #116792 (Avoid unnecessary renumbering during borrowck) - #116841 (Suggest unwrap/expect for let binding type mismatch) - #116943 (Add target features for LoongArch) - #117010 (Add method to convert internal to stable constructs) - #117127 (Remove `#[allow(incomplete_features)]` from RPITIT/AFIT tests) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 98b4a64 + 060bdfd commit 151256b

File tree

75 files changed

+1035
-435
lines changed

Some content is hidden

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

75 files changed

+1035
-435
lines changed
 

‎Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4525,6 +4525,7 @@ dependencies = [
45254525
"rustc_middle",
45264526
"rustc_span",
45274527
"rustc_target",
4528+
"scoped-tls",
45284529
"stable_mir",
45294530
"tracing",
45304531
]

‎compiler/rustc_borrowck/src/renumber.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ impl<'a, 'tcx> MutVisitor<'tcx> for RegionRenumberer<'a, 'tcx> {
8181

8282
#[instrument(skip(self), level = "debug")]
8383
fn visit_ty(&mut self, ty: &mut Ty<'tcx>, ty_context: TyContext) {
84+
if matches!(ty_context, TyContext::ReturnTy(_)) {
85+
// We will renumber the return ty when called again with `TyContext::LocalDecl`
86+
return;
87+
}
8488
*ty = self.renumber_regions(*ty, || RegionCtxt::TyContext(ty_context));
8589

8690
debug!(?ty);

0 commit comments

Comments
 (0)