@@ -15,7 +15,6 @@ use rustc_infer::infer::{self, InferCtxt, SubregionOrigin, TyCtxtInferExt};
15
15
use rustc_lint_defs:: builtin:: SUPERTRAIT_ITEM_SHADOWING_DEFINITION ;
16
16
use rustc_macros:: LintDiagnostic ;
17
17
use rustc_middle:: mir:: interpret:: ErrorHandled ;
18
- use rustc_middle:: query:: Providers ;
19
18
use rustc_middle:: traits:: solve:: NoSolution ;
20
19
use rustc_middle:: ty:: trait_def:: TraitSpecializationKind ;
21
20
use rustc_middle:: ty:: {
@@ -189,7 +188,10 @@ where
189
188
}
190
189
}
191
190
192
- fn check_well_formed ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) -> Result < ( ) , ErrorGuaranteed > {
191
+ pub ( super ) fn check_well_formed (
192
+ tcx : TyCtxt < ' _ > ,
193
+ def_id : LocalDefId ,
194
+ ) -> Result < ( ) , ErrorGuaranteed > {
193
195
let mut res = crate :: check:: check:: check_item_type ( tcx, def_id) ;
194
196
195
197
for param in & tcx. generics_of ( def_id) . own_params {
@@ -2249,7 +2251,7 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
2249
2251
}
2250
2252
}
2251
2253
2252
- fn check_type_wf ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) -> Result < ( ) , ErrorGuaranteed > {
2254
+ pub ( super ) fn check_type_wf ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) -> Result < ( ) , ErrorGuaranteed > {
2253
2255
let items = tcx. hir_crate_items ( ( ) ) ;
2254
2256
let res = items
2255
2257
. par_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) )
@@ -2397,7 +2399,3 @@ struct RedundantLifetimeArgsLint<'tcx> {
2397
2399
// The lifetime we can replace the victim with.
2398
2400
candidate : ty:: Region < ' tcx > ,
2399
2401
}
2400
-
2401
- pub fn provide ( providers : & mut Providers ) {
2402
- * providers = Providers { check_type_wf, check_well_formed, ..* providers } ;
2403
- }
0 commit comments