Rollup merge of #89001 - jackh726:binder-cleanup, r=nikomatsakis
Be explicit about using Binder::dummy This is somewhat of a late followup to the binder refactor PR. It removes `ToPredicate` and `ToPolyTraitImpls` that hide the use of `Binder::dummy`. While this does make code a bit more verbose, it allows us be more careful about where we create binders. Another alternative here might be to add a new trait `ToBinder` or something with a `dummy()` fn. Which could still allow grepping but allows doing something like `trait_ref.dummy()` (but I also wonder if longer-term, it would be better to be even more explicit with a `bind_with_vars(ty::List::empty())` *but* that's not clear yet. r? ``@nikomatsakis``
This commit is contained in:
commit
ee2e97c416
34 changed files with 127 additions and 121 deletions
|
@ -140,7 +140,8 @@ pub fn type_known_to_meet_bound_modulo_regions<'a, 'tcx>(
|
|||
infcx.tcx.def_path_str(def_id)
|
||||
);
|
||||
|
||||
let trait_ref = ty::TraitRef { def_id, substs: infcx.tcx.mk_substs_trait(ty, &[]) };
|
||||
let trait_ref =
|
||||
ty::Binder::dummy(ty::TraitRef { def_id, substs: infcx.tcx.mk_substs_trait(ty, &[]) });
|
||||
let obligation = Obligation {
|
||||
param_env,
|
||||
cause: ObligationCause::misc(span, hir::CRATE_HIR_ID),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue