Skip to content

Commit 714d047

Browse files
Merge pull request #21433 from Wilfred/rustdoc_private_items
internal: Include private definitions in generated rustdoc
2 parents 4ff04e5 + 9c0d88c commit 714d047

File tree

21 files changed

+32
-28
lines changed

21 files changed

+32
-28
lines changed

.github/workflows/rustdoc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: rustup update --no-self-update stable
2525

2626
- name: Build Documentation
27-
run: cargo doc --all --no-deps
27+
run: cargo doc --all --no-deps --document-private-items
2828

2929
- name: Deploy Docs
3030
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0

crates/hir-def/src/nameres.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ struct DefMapCrateData {
216216
registered_tools: Vec<Symbol>,
217217
/// Unstable features of Rust enabled with `#![feature(A, B)]`.
218218
unstable_features: FxHashSet<Symbol>,
219-
/// #[rustc_coherence_is_core]
219+
/// `#[rustc_coherence_is_core]`
220220
rustc_coherence_is_core: bool,
221221
no_core: bool,
222222
no_std: bool,

crates/hir-expand/src/builtin/attr_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ fn dummy_gate_test_expand(
115115
/// wasting a lot of memory, and it would also require some way to use a path in a way that makes it
116116
/// always resolve as a derive without nameres recollecting them.
117117
/// So this hacky approach is a lot more friendly for us, though it does require a bit of support in
118-
/// [`hir::Semantics`] to make this work.
118+
/// hir::Semantics to make this work.
119119
fn derive_expand(
120120
db: &dyn ExpandDatabase,
121121
id: MacroCallId,

crates/hir-expand/src/cfg_process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Processes out #[cfg] and #[cfg_attr] attributes from the input for the derive macro
1+
//! Processes out `#[cfg]` and `#[cfg_attr]` attributes from the input for the derive macro
22
use std::{cell::OnceCell, ops::ControlFlow};
33

44
use ::tt::TextRange;

crates/hir-ty/src/infer/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ impl<'db> InferenceContext<'_, 'db> {
466466
}
467467

468468
/// Given an `FnOnce::Output` or `AsyncFn::Output` projection, extract the args
469-
/// and return type to infer a [`ty::PolyFnSig`] for the closure.
469+
/// and return type to infer a `PolyFnSig` for the closure.
470470
fn extract_sig_from_projection(
471471
&self,
472472
projection: PolyProjectionPredicate<'db>,

crates/hir-ty/src/method_resolution.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
206206
}
207207
}
208208

209-
/// Used by [FnCtxt::lookup_method_for_operator] with `-Znext-solver`.
209+
/// Used by `FnCtxt::lookup_method_for_operator` with `-Znext-solver`.
210210
///
211211
/// With `AsRigid` we error on `impl Opaque: NotInItemBounds` while
212212
/// `AsInfer` just treats it as ambiguous and succeeds. This is necessary
213-
/// as we want [FnCtxt::check_expr_call] to treat not-yet-defined opaque
213+
/// as we want `FnCtxt::check_expr_call` to treat not-yet-defined opaque
214214
/// types as rigid to support `impl Deref<Target = impl FnOnce()>` and
215215
/// `Box<impl FnOnce()>`.
216216
///

crates/hir-ty/src/method_resolution/probe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ impl<'a, 'db, Choice: ProbeChoice<'db>> ProbeContext<'a, 'db, Choice> {
17401740
/// We want to only accept trait methods if they were hold even if the
17411741
/// opaque types were rigid. To handle this, we both check that for trait
17421742
/// candidates the goal were to hold even when treating opaques as rigid,
1743-
/// see [OpaqueTypesJank](rustc_trait_selection::solve::OpaqueTypesJank).
1743+
/// see `rustc_trait_selection::solve::OpaqueTypesJank`.
17441744
///
17451745
/// We also check that all opaque types encountered as self types in the
17461746
/// autoderef chain don't get constrained when applying the candidate.

crates/hir-ty/src/next_solver/infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub struct InferCtxtInner<'db> {
140140
///
141141
/// Before running `resolve_regions_and_report_errors`, the creator
142142
/// of the inference context is expected to invoke
143-
/// [`InferCtxt::process_registered_region_obligations`]
143+
/// `InferCtxt::process_registered_region_obligations`
144144
/// for each body-id in this map, which will process the
145145
/// obligations within. This is expected to be done 'late enough'
146146
/// that all type inference variables have been bound and so forth.

crates/hir/src/term_search.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl<'db> LookupTable<'db> {
172172
/// Insert new type trees for type
173173
///
174174
/// Note that the types have to be the same, unification is not enough as unification is not
175-
/// transitive. For example Vec<i32> and FxHashSet<i32> both unify with Iterator<Item = i32>,
175+
/// transitive. For example `Vec<i32>` and `FxHashSet<i32>` both unify with `Iterator<Item = i32>`,
176176
/// but they clearly do not unify themselves.
177177
fn insert(&mut self, ty: Type<'db>, exprs: impl Iterator<Item = Expr<'db>>) {
178178
match self.data.get_mut(&ty) {

crates/ide-assists/src/handlers/inline_type_alias.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,19 +290,23 @@ impl ConstAndTypeMap {
290290
/// ^ alias generic params
291291
/// let a: A<100>;
292292
/// ^ instance generic args
293-
/// ```
294293
///
295294
/// generic['a] = '_ due to omission
296295
/// generic[N] = 100 due to the instance arg
297296
/// generic[T] = u64 due to the default param
297+
/// ```
298298
///
299299
/// 2. Copy the concrete type and substitute in each found mapping:
300300
///
301+
/// ```ignore
301302
/// &'_ [u64; 100]
303+
/// ```
302304
///
303305
/// 3. Remove wildcard lifetimes entirely:
304306
///
307+
/// ```ignore
305308
/// &[u64; 100]
309+
/// ```
306310
fn create_replacement(
307311
lifetime_map: &LifetimeMap,
308312
const_and_type_map: &ConstAndTypeMap,

0 commit comments

Comments
 (0)