@@ -746,7 +746,7 @@ fn check_where_clauses<'tcx, 'fcx>(
746
746
// Ignore dependent defaults -- that is, where the default of one type
747
747
// parameter includes another (e.g., `<T, U = T>`). In those cases, we can't
748
748
// be sure if it will error or not as user might always specify the other.
749
- if !ty. needs_subst ( tcx) {
749
+ if !ty. definitely_needs_subst ( tcx) {
750
750
fcx. register_wf_obligation (
751
751
ty. into ( ) ,
752
752
tcx. def_span ( param. def_id ) ,
@@ -762,7 +762,7 @@ fn check_where_clauses<'tcx, 'fcx>(
762
762
// for `struct Foo<const N: usize, const M: usize = { 1 - 2 }>`
763
763
// we should eagerly error.
764
764
let default_ct = tcx. const_param_default ( param. def_id ) ;
765
- if !default_ct. needs_subst ( tcx) {
765
+ if !default_ct. definitely_needs_subst ( tcx) {
766
766
fcx. register_wf_obligation (
767
767
default_ct. into ( ) ,
768
768
tcx. def_span ( param. def_id ) ,
@@ -796,7 +796,7 @@ fn check_where_clauses<'tcx, 'fcx>(
796
796
if is_our_default ( param) {
797
797
let default_ty = tcx. type_of ( param. def_id ) ;
798
798
// ... and it's not a dependent default, ...
799
- if !default_ty. needs_subst ( tcx) {
799
+ if !default_ty. definitely_needs_subst ( tcx) {
800
800
// ... then substitute it with the default.
801
801
return default_ty. into ( ) ;
802
802
}
@@ -809,7 +809,7 @@ fn check_where_clauses<'tcx, 'fcx>(
809
809
if is_our_default ( param) {
810
810
let default_ct = tcx. const_param_default ( param. def_id ) ;
811
811
// ... and it's not a dependent default, ...
812
- if !default_ct. needs_subst ( tcx) {
812
+ if !default_ct. definitely_needs_subst ( tcx) {
813
813
// ... then substitute it with the default.
814
814
return default_ct. into ( ) ;
815
815
}
@@ -858,7 +858,7 @@ fn check_where_clauses<'tcx, 'fcx>(
858
858
let substituted_pred = pred. subst ( tcx, substs) ;
859
859
// Don't check non-defaulted params, dependent defaults (including lifetimes)
860
860
// or preds with multiple params.
861
- if substituted_pred. has_param_types_or_consts ( tcx)
861
+ if substituted_pred. definitely_has_param_types_or_consts ( tcx)
862
862
|| param_count. params . len ( ) > 1
863
863
|| has_region
864
864
{
0 commit comments