cyclesss
This commit is contained in:
parent
2ac171f94c
commit
a49b746da4
2 changed files with 3 additions and 5 deletions
|
|
@ -2279,7 +2279,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
}
|
||||
hir::TyKind::Typeof(ref e) => {
|
||||
tcx.sess.emit_err(TypeofReservedKeywordUsed { span: ast_ty.span });
|
||||
tcx.type_of(e.hir_id.owner)
|
||||
tcx.type_of(tcx.hir().local_def_id(e.hir_id))
|
||||
}
|
||||
hir::TyKind::Infer => {
|
||||
// Infer also appears as the type of arguments or return
|
||||
|
|
|
|||
|
|
@ -422,10 +422,8 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
|
|||
{
|
||||
tcx.types.usize
|
||||
}
|
||||
Node::Ty(&Ty { kind: TyKind::Typeof(ref constant), .. })
|
||||
if constant.hir_id == hir_id =>
|
||||
{
|
||||
tcx.typeck(def_id).node_type(constant.hir_id)
|
||||
Node::Ty(&Ty { kind: TyKind::Typeof(ref e), .. }) if e.hir_id == hir_id => {
|
||||
tcx.typeck(def_id).node_type(e.hir_id)
|
||||
}
|
||||
|
||||
Node::Expr(&Expr { kind: ExprKind::ConstBlock(ref anon_const), .. })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue