Merge remote-tracking branch 'upstream/master' into rustup

This commit is contained in:
Philipp Krones 2025-01-28 18:28:57 +01:00
commit 145d5adf04
No known key found for this signature in database
GPG key ID: 1CA0DF2AF59D68A5
282 changed files with 5798 additions and 885 deletions

View file

@ -223,19 +223,17 @@ impl<'tcx> Visitor<'tcx> for NumericFallbackVisitor<'_, 'tcx> {
}
fn visit_pat(&mut self, pat: &'tcx Pat<'_>) {
match pat.kind {
PatKind::Expr(&PatExpr {
hir_id,
kind: PatExprKind::Lit { lit, .. },
..
}) => {
let ty = self.cx.typeck_results().node_type(hir_id);
self.check_lit(lit, ty, hir_id);
return;
},
_ => {},
if let PatKind::Expr(&PatExpr {
hir_id,
kind: PatExprKind::Lit { lit, .. },
..
}) = pat.kind
{
let ty = self.cx.typeck_results().node_type(hir_id);
self.check_lit(lit, ty, hir_id);
return;
}
walk_pat(self, pat)
walk_pat(self, pat);
}
fn visit_stmt(&mut self, stmt: &'tcx Stmt<'_>) {