Add bound_type_of
This commit is contained in:
parent
319575ae8c
commit
c92248ab9f
30 changed files with 90 additions and 83 deletions
|
@ -14,7 +14,7 @@ use rustc_infer::traits::Normalized;
|
|||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeFolder};
|
||||
use rustc_middle::ty::subst::Subst;
|
||||
use rustc_middle::ty::{self, EarlyBinder, Ty, TyCtxt, TypeVisitor};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitor};
|
||||
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
|
@ -217,8 +217,8 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
|
|||
self.infcx.report_overflow_error(&obligation, true);
|
||||
}
|
||||
|
||||
let generic_ty = self.tcx().type_of(def_id);
|
||||
let concrete_ty = EarlyBinder(generic_ty).subst(self.tcx(), substs);
|
||||
let generic_ty = self.tcx().bound_type_of(def_id);
|
||||
let concrete_ty = generic_ty.subst(self.tcx(), substs);
|
||||
self.anon_depth += 1;
|
||||
if concrete_ty == ty {
|
||||
bug!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue