Prevent the creation of TraitRef
without dedicated methods
This commit is contained in:
parent
a5cd3bde95
commit
6af3638709
9 changed files with 44 additions and 47 deletions
|
@ -1309,8 +1309,7 @@ fn assemble_candidate_for_impl_trait_in_trait<'cx, 'tcx>(
|
|||
let trait_substs =
|
||||
obligation.predicate.substs.truncate_to(tcx, tcx.generics_of(trait_def_id));
|
||||
// FIXME(named-returns): Binders
|
||||
let trait_predicate =
|
||||
ty::Binder::dummy(ty::TraitRef { def_id: trait_def_id, substs: trait_substs });
|
||||
let trait_predicate = ty::Binder::dummy(tcx.mk_trait_ref(trait_def_id, trait_substs));
|
||||
|
||||
let _ = selcx.infcx.commit_if_ok(|_| {
|
||||
match selcx.select(&obligation.with(tcx, trait_predicate)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue