From 968ce252a849e1890e5701ed92b8861ce4ac1fe2 Mon Sep 17 00:00:00 2001 From: Mark Mansi Date: Sun, 25 Feb 2018 15:24:14 -0600 Subject: [PATCH] Change links to readmes --- src/librustc/README.md | 3 +++ src/librustc/dep_graph/graph.rs | 4 ++-- src/librustc/hir/mod.rs | 4 ++-- src/librustc/lib.rs | 5 +++-- src/librustc/traits/coherence.rs | 6 +++++- src/librustc/traits/mod.rs | 4 +++- src/librustc/traits/select.rs | 13 +++++++++---- src/librustc/ty/context.rs | 4 ++-- 8 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 src/librustc/README.md diff --git a/src/librustc/README.md b/src/librustc/README.md new file mode 100644 index 00000000000..9909ff91a18 --- /dev/null +++ b/src/librustc/README.md @@ -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/ diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs index 55ec8adb5fb..08d3a2bb1aa 100644 --- a/src/librustc/dep_graph/graph.rs +++ b/src/librustc/dep_graph/graph.rs @@ -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(&self, key: DepNode, cx: C, diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index bc03f7ead81..b2b8069bf1b 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -601,9 +601,9 @@ pub type CrateConfig = HirVec>; /// 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, diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index a7a26195059..7ab584954d2 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -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 //! diff --git a/src/librustc/traits/coherence.rs b/src/librustc/traits/coherence.rs index 7311b47974a..a9f1c8750f4 100644 --- a/src/librustc/traits/coherence.rs +++ b/src/librustc/traits/coherence.rs @@ -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; diff --git a/src/librustc/traits/mod.rs b/src/librustc/traits/mod.rs index 41cc8ca601a..bb26e9d0855 100644 --- a/src/librustc/traits/mod.rs +++ b/src/librustc/traits/mod.rs @@ -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::*; diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index 4ed25646d43..3ffde1521b9 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -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>, diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index e4e07454c97..3613a34f66a 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -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>,