1
Fork 0

Add some intra-doc links to compiler docs

This commit is contained in:
Joshua Nelson 2020-12-22 09:54:23 -05:00
parent 50a90975c0
commit 9cd992f394
5 changed files with 13 additions and 5 deletions

View file

@ -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>>,

View file

@ -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>,

View file

@ -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>>>,
}