Skip to content

Commit 9cd992f

Browse files
committed
Add some intra-doc links to compiler docs
1 parent 50a9097 commit 9cd992f

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

compiler/rustc_builtin_macros/src/deriving/generic/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ pub struct Substructure<'a> {
257257
pub type_ident: Ident,
258258
/// ident of the method
259259
pub method_ident: Ident,
260-
/// dereferenced access to any `Self_` or `Ptr(Self_, _)` arguments
260+
/// dereferenced access to any [`Self_`] or [`Ptr(Self_, _)][ptr]` arguments
261+
///
262+
/// [`Self_`]: ty::Ty::Self_
263+
/// [ptr]: ty::Ty::Ptr
261264
pub self_args: &'a [P<Expr>],
262265
/// verbatim access to any other arguments
263266
pub nonself_args: &'a [P<Expr>],

compiler/rustc_interface/src/interface.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ use std::sync::{Arc, Mutex};
2525
pub type Result<T> = result::Result<T, ErrorReported>;
2626

2727
/// Represents a compiler session.
28+
///
2829
/// Can be used to run `rustc_interface` queries.
29-
/// Created by passing `Config` to `run_compiler`.
30+
/// Created by passing [`Config`] to [`run_compiler`].
3031
pub struct Compiler {
3132
pub(crate) sess: Lrc<Session>,
3233
codegen_backend: Lrc<Box<dyn CodegenBackend>>,

compiler/rustc_interface/src/passes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ declare_box_region_type!(
9595
/// harness if one is to be provided, injection of a dependency on the
9696
/// standard library and prelude, and name resolution.
9797
///
98-
/// Returns `None` if we're aborting after handling -W help.
98+
/// Returns [`None`] if we're aborting after handling -W help.
9999
pub fn configure_and_expand(
100100
sess: Lrc<Session>,
101101
lint_store: Lrc<LintStore>,

compiler/rustc_interface/src/queries.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ use std::cell::{Ref, RefCell, RefMut};
2323
use std::rc::Rc;
2424

2525
/// Represent the result of a query.
26-
/// This result can be stolen with the `take` method and generated with the `compute` method.
26+
///
27+
/// This result can be stolen with the [`take`] method and generated with the [`compute`] method.
28+
///
29+
/// [`take`]: Self::take
30+
/// [`compute`]: Self::compute
2731
pub struct Query<T> {
2832
result: RefCell<Option<Result<T>>>,
2933
}

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ fn with_interner<T, F: FnOnce(&mut Interner) -> T>(f: F) -> T {
16811681
SESSION_GLOBALS.with(|session_globals| f(&mut *session_globals.symbol_interner.lock()))
16821682
}
16831683

1684-
/// An alternative to `Symbol`, useful when the chars within the symbol need to
1684+
/// An alternative to [`Symbol`], useful when the chars within the symbol need to
16851685
/// be accessed. It deliberately has limited functionality and should only be
16861686
/// used for temporary values.
16871687
///

0 commit comments

Comments
 (0)