diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2025-07-03 10:59:14 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2025-07-03 13:49:34 -0700 |
| commit | 3b7f9f9d1b75cb98d8bd09cdedf2ded13283abf8 (patch) | |
| tree | 26f873e7e29589abb5907071ce19dfd3306c82da | |
| parent | f5fbb2c0a5f2026453a3fa4c46afaaa2c0092e1f (diff) | |
| download | rust-3b7f9f9d1b75cb98d8bd09cdedf2ded13283abf8.tar.gz rust-3b7f9f9d1b75cb98d8bd09cdedf2ded13283abf8.zip | |
compiler: document all provide fn in hir_analysis and hir_typeck
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/coherence/mod.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_hir_typeck/src/lib.rs | 1 |
6 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/mod.rs b/compiler/rustc_hir_analysis/src/check/mod.rs index c9c218a79db..b2cfab37c1f 100644 --- a/compiler/rustc_hir_analysis/src/check/mod.rs +++ b/compiler/rustc_hir_analysis/src/check/mod.rs @@ -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, diff --git a/compiler/rustc_hir_analysis/src/coherence/mod.rs b/compiler/rustc_hir_analysis/src/coherence/mod.rs index 16bac430491..ed8f78216ff 100644 --- a/compiler/rustc_hir_analysis/src/coherence/mod.rs +++ b/compiler/rustc_hir_analysis/src/coherence/mod.rs @@ -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::{ diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index b10d5b55789..aad9b08b2a3 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -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 { diff --git a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs index 95743f9a63e..0e775d374ab 100644 --- a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs +++ b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs @@ -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, diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index 19decfeff85..3a153ab089a 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -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); diff --git a/compiler/rustc_hir_typeck/src/lib.rs b/compiler/rustc_hir_typeck/src/lib.rs index eae6c2e8ed8..ea8c2c6ce23 100644 --- a/compiler/rustc_hir_typeck/src/lib.rs +++ b/compiler/rustc_hir_typeck/src/lib.rs @@ -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, |
