Move query providers.
This commit is contained in:
parent
1b4b5e066b
commit
6f8e9f416a
2 changed files with 10 additions and 6 deletions
|
@ -712,7 +712,16 @@ fn check_mod_unstable_api_usage(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
|
|||
}
|
||||
|
||||
pub(crate) fn provide(providers: &mut Providers) {
|
||||
*providers = Providers { check_mod_unstable_api_usage, stability_index, ..*providers };
|
||||
*providers = Providers {
|
||||
check_mod_unstable_api_usage,
|
||||
stability_index,
|
||||
lookup_stability: |tcx, id| tcx.stability().local_stability(id.expect_local()),
|
||||
lookup_const_stability: |tcx, id| tcx.stability().local_const_stability(id.expect_local()),
|
||||
lookup_deprecation_entry: |tcx, id| {
|
||||
tcx.stability().local_deprecation_entry(id.expect_local())
|
||||
},
|
||||
..*providers
|
||||
};
|
||||
}
|
||||
|
||||
struct Checker<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue