remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
This commit is contained in:
parent
d822b97a27
commit
c183110cc2
164 changed files with 325 additions and 380 deletions
|
@ -101,7 +101,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
|
|||
|
||||
let inferred_start = self.terms_cx.inferred_starts[&def_id];
|
||||
let current_item = &CurrentItem { inferred_start };
|
||||
match tcx.bound_type_of(def_id).subst_identity().kind() {
|
||||
match tcx.type_of(def_id).subst_identity().kind() {
|
||||
ty::Adt(def, _) => {
|
||||
// Not entirely obvious: constraints on structs/enums do not
|
||||
// affect the variance of their type parameters. See discussion
|
||||
|
@ -112,7 +112,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
|
|||
for field in def.all_fields() {
|
||||
self.add_constraints_from_ty(
|
||||
current_item,
|
||||
tcx.bound_type_of(field.did).subst_identity(),
|
||||
tcx.type_of(field.did).subst_identity(),
|
||||
self.covariant,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue