Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bef3c3b

Browse files
committedFeb 4, 2025·
Auto merge of rust-lang#136549 - matthiaskrgr:rollup-sqbpgtd, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#136242 (Remove `LateContext::match_def_path()`) - rust-lang#136274 (Check Sizedness of return type in WF) - rust-lang#136284 (Allow using named consts in pattern types) - rust-lang#136477 (Fix a couple NLL TLS spans ) - rust-lang#136497 (Report generic mismatches when calling bodyless trait functions) - rust-lang#136520 (Remove unnecessary layout assertions for object-safe receivers) - rust-lang#136526 (mir_build: Rename `thir::cx::Cx` to `ThirBuildCx` and remove `UserAnnotatedTyHelpers`) Failed merges: - rust-lang#136304 (Reject negative literals for unsigned or char types in pattern ranges and literals) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 3f33b30 + 1b7efa2 commit bef3c3b

File tree

118 files changed

+1369
-1063
lines changed

Some content is hidden

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

118 files changed

+1369
-1063
lines changed
 

‎compiler/rustc_ast_lowering/src/index.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,12 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
412412
});
413413
}
414414

415-
fn visit_pattern_type_pattern(&mut self, p: &'hir hir::Pat<'hir>) {
416-
self.visit_pat(p)
415+
fn visit_pattern_type_pattern(&mut self, pat: &'hir hir::TyPat<'hir>) {
416+
self.insert(pat.span, pat.hir_id, Node::TyPat(pat));
417+
418+
self.with_parent(pat.hir_id, |this| {
419+
intravisit::walk_ty_pat(this, pat);
420+
});
417421
}
418422

419423
fn visit_precise_capturing_arg(

‎compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,9 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
13771377
}
13781378
}
13791379
}
1380-
TyKind::Pat(ty, pat) => hir::TyKind::Pat(self.lower_ty(ty, itctx), self.lower_pat(pat)),
1380+
TyKind::Pat(ty, pat) => {
1381+
hir::TyKind::Pat(self.lower_ty(ty, itctx), self.lower_ty_pat(pat))
1382+
}
13811383
TyKind::MacCall(_) => {
13821384
span_bug!(t.span, "`TyKind::MacCall` should have been expanded by now")
13831385
}

0 commit comments

Comments
 (0)
This repository has been archived.