Try to resolve type vars in the placeholder errors trait refs
These can sometimes be unresolved: some of the rustc UI tests show this.
This commit is contained in:
parent
a6028263d2
commit
823c888be2
1 changed files with 12 additions and 8 deletions
|
@ -224,14 +224,18 @@ impl NiceRegionError<'me, 'gcx, 'tcx> {
|
|||
_ => (),
|
||||
}
|
||||
|
||||
let expected_trait_ref = ty::TraitRef {
|
||||
def_id: trait_def_id,
|
||||
substs: expected_substs,
|
||||
};
|
||||
let actual_trait_ref = ty::TraitRef {
|
||||
def_id: trait_def_id,
|
||||
substs: actual_substs,
|
||||
};
|
||||
let expected_trait_ref = self.infcx.resolve_type_vars_if_possible(
|
||||
&ty::TraitRef {
|
||||
def_id: trait_def_id,
|
||||
substs: expected_substs,
|
||||
}
|
||||
);
|
||||
let actual_trait_ref = self.infcx.resolve_type_vars_if_possible(
|
||||
&ty::TraitRef {
|
||||
def_id: trait_def_id,
|
||||
substs: actual_substs,
|
||||
}
|
||||
);
|
||||
|
||||
// Search the expected and actual trait references to see (a)
|
||||
// whether the sub/sup placeholders appear in them (sometimes
|
||||
|
|
Loading…
Reference in a new issue