mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Rollup merge of #80297 - jyn514:more-docs, r=bjorn3
Add some intra-doc links to compiler docs r? `@pierwill`
This commit is contained in:
commit
125156ca0f
@ -257,7 +257,10 @@ pub struct Substructure<'a> {
|
||||
pub type_ident: Ident,
|
||||
/// ident of the method
|
||||
pub method_ident: Ident,
|
||||
/// dereferenced access to any `Self_` or `Ptr(Self_, _)` arguments
|
||||
/// dereferenced access to any [`Self_`] or [`Ptr(Self_, _)][ptr]` arguments
|
||||
///
|
||||
/// [`Self_`]: ty::Ty::Self_
|
||||
/// [ptr]: ty::Ty::Ptr
|
||||
pub self_args: &'a [P<Expr>],
|
||||
/// verbatim access to any other arguments
|
||||
pub nonself_args: &'a [P<Expr>],
|
||||
|
@ -25,8 +25,9 @@ use std::sync::{Arc, Mutex};
|
||||
pub type Result<T> = result::Result<T, ErrorReported>;
|
||||
|
||||
/// Represents a compiler session.
|
||||
///
|
||||
/// Can be used to run `rustc_interface` queries.
|
||||
/// Created by passing `Config` to `run_compiler`.
|
||||
/// Created by passing [`Config`] to [`run_compiler`].
|
||||
pub struct Compiler {
|
||||
pub(crate) sess: Lrc<Session>,
|
||||
codegen_backend: Lrc<Box<dyn CodegenBackend>>,
|
||||
|
@ -95,7 +95,7 @@ declare_box_region_type!(
|
||||
/// harness if one is to be provided, injection of a dependency on the
|
||||
/// standard library and prelude, and name resolution.
|
||||
///
|
||||
/// Returns `None` if we're aborting after handling -W help.
|
||||
/// Returns [`None`] if we're aborting after handling -W help.
|
||||
pub fn configure_and_expand(
|
||||
sess: Lrc<Session>,
|
||||
lint_store: Lrc<LintStore>,
|
||||
|
@ -23,7 +23,11 @@ use std::cell::{Ref, RefCell, RefMut};
|
||||
use std::rc::Rc;
|
||||
|
||||
/// Represent the result of a query.
|
||||
/// This result can be stolen with the `take` method and generated with the `compute` method.
|
||||
///
|
||||
/// This result can be stolen with the [`take`] method and generated with the [`compute`] method.
|
||||
///
|
||||
/// [`take`]: Self::take
|
||||
/// [`compute`]: Self::compute
|
||||
pub struct Query<T> {
|
||||
result: RefCell<Option<Result<T>>>,
|
||||
}
|
||||
|
@ -1702,7 +1702,7 @@ fn with_interner<T, F: FnOnce(&mut Interner) -> T>(f: F) -> T {
|
||||
SESSION_GLOBALS.with(|session_globals| f(&mut *session_globals.symbol_interner.lock()))
|
||||
}
|
||||
|
||||
/// An alternative to `Symbol`, useful when the chars within the symbol need to
|
||||
/// An alternative to [`Symbol`], useful when the chars within the symbol need to
|
||||
/// be accessed. It deliberately has limited functionality and should only be
|
||||
/// used for temporary values.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user