Skip to content

Commit

Permalink
Rollup merge of #110893 - BoxyUwU:inline_const_nits, r=compiler-errors
Browse files Browse the repository at this point in the history
remove inline const deadcode in typeck

inline consts get typeck'd with their parent so this is not reachable
  • Loading branch information
JohnTitor authored Apr 28, 2023
2 parents 0246af8 + bdb956e commit c464be9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions compiler/rustc_hir_typeck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,6 @@ fn typeck_with_fallback<'tcx>(
}))
} else if let Node::AnonConst(_) = node {
match tcx.hir().get(tcx.hir().parent_id(id)) {
Node::Expr(&hir::Expr {
kind: hir::ExprKind::ConstBlock(ref anon_const), ..
}) if anon_const.hir_id == id => Some(fcx.next_ty_var(TypeVariableOrigin {
kind: TypeVariableOriginKind::TypeInference,
span,
})),
Node::Ty(&hir::Ty { kind: hir::TyKind::Typeof(ref anon_const), .. })
if anon_const.hir_id == id =>
{
Expand Down

0 comments on commit c464be9

Please sign in to comment.