@@ -90,6 +90,7 @@ declare_lint_pass!(QueryStability => [POTENTIAL_QUERY_INSTABILITY]);
90
90
impl LateLintPass < ' _ > for QueryStability {
91
91
fn check_expr ( & mut self , cx : & LateContext < ' _ > , expr : & Expr < ' _ > ) {
92
92
let Some ( ( span, def_id, substs) ) = typeck_results_of_method_fn ( cx, expr) else { return } ;
93
+ let substs = cx. tcx . normalize_erasing_regions ( cx. param_env , substs) ;
93
94
if let Ok ( Some ( instance) ) = ty:: Instance :: resolve ( cx. tcx , cx. param_env , def_id, substs) {
94
95
let def_id = instance. def_id ( ) ;
95
96
if cx. tcx . has_attr ( def_id, sym:: rustc_lint_query_instability) {
@@ -380,6 +381,7 @@ declare_lint_pass!(Diagnostics => [ UNTRANSLATABLE_DIAGNOSTIC, DIAGNOSTIC_OUTSID
380
381
impl LateLintPass < ' _ > for Diagnostics {
381
382
fn check_expr ( & mut self , cx : & LateContext < ' _ > , expr : & Expr < ' _ > ) {
382
383
let Some ( ( span, def_id, substs) ) = typeck_results_of_method_fn ( cx, expr) else { return } ;
384
+ let substs = cx. tcx . normalize_erasing_regions ( cx. param_env , substs) ;
383
385
debug ! ( ?span, ?def_id, ?substs) ;
384
386
let has_attr = ty:: Instance :: resolve ( cx. tcx , cx. param_env , def_id, substs)
385
387
. ok ( )
0 commit comments