compiler: document all provide fn in hir_analysis and hir_typeck

This commit is contained in:
Jubilee Young 2025-07-03 10:59:14 -07:00
parent f5fbb2c0a5
commit 3b7f9f9d1b
6 changed files with 7 additions and 2 deletions

View file

@ -100,8 +100,8 @@ use self::compare_impl_item::collect_return_position_impl_trait_in_trait_tys;
use self::region::region_scope_tree;
use crate::{errors, require_c_abi_if_c_variadic};
pub fn provide(providers: &mut Providers) {
wfcheck::provide(providers);
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub(super) fn provide(providers: &mut Providers) {
*providers = Providers {
adt_destructor,
adt_async_destructor,

View file

@ -130,6 +130,7 @@ fn enforce_empty_impls_for_marker_traits(
.emit())
}
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`].
pub(crate) fn provide(providers: &mut Providers) {
use self::builtin::coerce_unsized_info;
use self::inherent_impls::{

View file

@ -61,6 +61,7 @@ mod type_of;
///////////////////////////////////////////////////////////////////////////
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub(crate) fn provide(providers: &mut Providers) {
resolve_bound_vars::provide(providers);
*providers = Providers {

View file

@ -222,6 +222,7 @@ enum BinderScopeType {
type ScopeRef<'a> = &'a Scope<'a>;
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub(crate) fn provide(providers: &mut Providers) {
*providers = Providers {
resolve_bound_vars,

View file

@ -150,6 +150,7 @@ fn require_c_abi_if_c_variadic(
.emit();
}
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub fn provide(providers: &mut Providers) {
collect::provide(providers);
coherence::provide(providers);

View file

@ -536,6 +536,7 @@ fn fatally_break_rust(tcx: TyCtxt<'_>, span: Span) -> ! {
diag.emit()
}
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub fn provide(providers: &mut Providers) {
*providers = Providers {
method_autoderef_steps: method::probe::method_autoderef_steps,