rename needs_subst
to has_param
This commit is contained in:
parent
f04b8fe0af
commit
842419712a
18 changed files with 28 additions and 28 deletions
|
@ -582,7 +582,7 @@ fn orphan_check_trait_ref<'tcx>(
|
|||
trait_ref: ty::TraitRef<'tcx>,
|
||||
in_crate: InCrate,
|
||||
) -> Result<(), OrphanCheckErr<'tcx>> {
|
||||
if trait_ref.has_infer() && trait_ref.needs_subst() {
|
||||
if trait_ref.has_infer() && trait_ref.has_param() {
|
||||
bug!(
|
||||
"can't orphan check a trait ref with both params and inference variables {:?}",
|
||||
trait_ref
|
||||
|
|
|
@ -414,7 +414,7 @@ fn subst_and_check_impossible_predicates<'tcx>(
|
|||
predicates.push(ty::Binder::dummy(trait_ref).to_predicate(tcx));
|
||||
}
|
||||
|
||||
predicates.retain(|predicate| !predicate.needs_subst());
|
||||
predicates.retain(|predicate| !predicate.has_param());
|
||||
let result = impossible_predicates(tcx, predicates);
|
||||
|
||||
debug!("subst_and_check_impossible_predicates(key={:?}) = {:?}", key, result);
|
||||
|
|
|
@ -1000,7 +1000,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
) -> Result<EvaluationResult, OverflowError> {
|
||||
if !self.is_intercrate()
|
||||
&& obligation.is_global()
|
||||
&& obligation.param_env.caller_bounds().iter().all(|bound| bound.needs_subst())
|
||||
&& obligation.param_env.caller_bounds().iter().all(|bound| bound.has_param())
|
||||
{
|
||||
// If a param env has no global bounds, global obligations do not
|
||||
// depend on its particular value in order to work, so we can clear
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue