Skip to content

Commit 3b7f9f9

Browse files
compiler: document all provide fn in hir_analysis and hir_typeck
1 parent f5fbb2c commit 3b7f9f9

File tree

6 files changed

+7
-2
lines changed

6 files changed

+7
-2
lines changed

compiler/rustc_hir_analysis/src/check/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ use self::compare_impl_item::collect_return_position_impl_trait_in_trait_tys;
100100
use self::region::region_scope_tree;
101101
use crate::{errors, require_c_abi_if_c_variadic};
102102

103-
pub fn provide(providers: &mut Providers) {
104-
wfcheck::provide(providers);
103+
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
104+
pub(super) fn provide(providers: &mut Providers) {
105105
*providers = Providers {
106106
adt_destructor,
107107
adt_async_destructor,

compiler/rustc_hir_analysis/src/coherence/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ fn enforce_empty_impls_for_marker_traits(
130130
.emit())
131131
}
132132

133+
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`].
133134
pub(crate) fn provide(providers: &mut Providers) {
134135
use self::builtin::coerce_unsized_info;
135136
use self::inherent_impls::{

compiler/rustc_hir_analysis/src/collect.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ mod type_of;
6161

6262
///////////////////////////////////////////////////////////////////////////
6363

64+
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
6465
pub(crate) fn provide(providers: &mut Providers) {
6566
resolve_bound_vars::provide(providers);
6667
*providers = Providers {

compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ enum BinderScopeType {
222222

223223
type ScopeRef<'a> = &'a Scope<'a>;
224224

225+
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
225226
pub(crate) fn provide(providers: &mut Providers) {
226227
*providers = Providers {
227228
resolve_bound_vars,

compiler/rustc_hir_analysis/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ fn require_c_abi_if_c_variadic(
150150
.emit();
151151
}
152152

153+
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
153154
pub fn provide(providers: &mut Providers) {
154155
collect::provide(providers);
155156
coherence::provide(providers);

compiler/rustc_hir_typeck/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ fn fatally_break_rust(tcx: TyCtxt<'_>, span: Span) -> ! {
536536
diag.emit()
537537
}
538538

539+
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
539540
pub fn provide(providers: &mut Providers) {
540541
*providers = Providers {
541542
method_autoderef_steps: method::probe::method_autoderef_steps,

0 commit comments

Comments
 (0)