Change links to readmes

This commit is contained in:
Mark Mansi 2018-02-25 15:24:14 -06:00
parent a05c5538d4
commit 968ce252a8
8 changed files with 29 additions and 14 deletions

3
src/librustc/README.md Normal file
View File

@ -0,0 +1,3 @@
For more information about how rustc works, see the [rustc guide].
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/

View File

@ -166,7 +166,7 @@ impl DepGraph {
/// what state they have access to. In particular, we want to
/// prevent implicit 'leaks' of tracked state into the task (which
/// could then be read without generating correct edges in the
/// dep-graph -- see the module-level [README] for more details on
/// dep-graph -- see the [rustc guide] for more details on
/// the dep-graph). To this end, the task function gets exactly two
/// pieces of state: the context `cx` and an argument `arg`. Both
/// of these bits of state must be of some type that implements
@ -186,7 +186,7 @@ impl DepGraph {
/// - If you need 3+ arguments, use a tuple for the
/// `arg` parameter.
///
/// [README]: https://github.com/rust-lang/rust/blob/master/src/librustc/dep_graph/README.md
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/incremental-compilation.html
pub fn with_task<C, A, R, HCX>(&self,
key: DepNode,
cx: C,

View File

@ -601,9 +601,9 @@ pub type CrateConfig = HirVec<P<MetaItem>>;
/// The top-level data structure that stores the entire contents of
/// the crate currently being compiled.
///
/// For more details, see the module-level [README].
/// For more details, see the [rustc guide].
///
/// [README]: https://github.com/rust-lang/rust/blob/master/src/librustc/hir/README.md.
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/hir.html
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Debug)]
pub struct Crate {
pub module: Mod,

View File

@ -28,8 +28,9 @@
//! this code handles low-level equality and subtyping operations. The
//! type check pass in the compiler is found in the `librustc_typeck` crate.
//!
//! For a deeper explanation of how the compiler works and is
//! organized, see the README.md file in this directory.
//! For more information about how rustc works, see the [rustc guide].
//!
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/
//!
//! # Note
//!

View File

@ -8,7 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! See `README.md` for high-level documentation
//! See rustc guide chapters on [trait-resolution] and [trait-specialization] for more info on how
//! this works.
//!
//! [trait-resolution]: https://rust-lang-nursery.github.io/rustc-guide/trait-resolution.html
//! [trait-specialization]: https://rust-lang-nursery.github.io/rustc-guide/trait-specialization.html
use hir::def_id::{DefId, LOCAL_CRATE};
use syntax_pos::DUMMY_SP;

View File

@ -8,7 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Trait Resolution. See README.md for an overview of how this works.
//! Trait Resolution. See [rustc guide] for more info on how this works.
//!
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/trait-resolution.html
pub use self::SelectionError::*;
pub use self::FulfillmentErrorCode::*;

View File

@ -8,7 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! See `README.md` for high-level documentation
//! See [rustc guide] for more info on how this works.
//!
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/trait-resolution.html#selection
use self::SelectionCandidate::*;
use self::EvaluationResult::*;
@ -1025,8 +1027,9 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
//
// The selection process begins by examining all in-scope impls,
// caller obligations, and so forth and assembling a list of
// candidates. See `README.md` and the `Candidate` type for more
// details.
// candidates. See [rustc guide] for more details.
//
// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/trait-resolution.html#candidate-assembly
fn candidate_from_obligation<'o>(&mut self,
stack: &TraitObligationStack<'o, 'tcx>)
@ -2312,7 +2315,9 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
//
// Confirmation unifies the output type parameters of the trait
// with the values found in the obligation, possibly yielding a
// type error. See `README.md` for more details.
// type error. See [rustc guide] for more details.
//
// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/trait-resolution.html#confirmation
fn confirm_candidate(&mut self,
obligation: &TraitObligation<'tcx>,

View File

@ -779,9 +779,9 @@ impl<'tcx> CommonTypes<'tcx> {
/// The central data structure of the compiler. It stores references
/// to the various **arenas** and also houses the results of the
/// various **compiler queries** that have been performed. See the
/// module-level [README] for more details.
/// [rustc guide] for more details.
///
/// [README]: https://github.com/rust-lang/rust/blob/master/src/librustc/ty/README.md
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/ty.html
#[derive(Copy, Clone)]
pub struct TyCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
gcx: &'a GlobalCtxt<'gcx>,