Rollup merge of #110893 - BoxyUwU:inline_const_nits, r=compiler-errors

remove inline const deadcode in typeck

inline consts get typeck'd with their parent so this is not reachable
This commit is contained in:
Yuki Okushi 2023-04-28 10:52:00 +09:00 committed by GitHub
commit c464be96f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 =>
{