summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authormark <markm@cs.wisc.edu>2020-03-31 15:20:55 -0500
committerWho? Me?! <mark-i-m@users.noreply.github.com>2020-03-31 15:43:14 -0500
commit2b2286711a797ec981abbb73d5e5f1c9ff94ed95 (patch)
treeaa59abed9dab0bacb7be99be88fc31b0e2736290 /src/doc/rustc-dev-guide
parent40c37244cf7fed407c66cd1d3551e85df204e113 (diff)
downloadrust-2b2286711a797ec981abbb73d5e5f1c9ff94ed95.tar.gz
rust-2b2286711a797ec981abbb73d5e5f1c9ff94ed95.zip
fix a few more links
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/bug-fix-procedure.md10
-rw-r--r--src/doc/rustc-dev-guide/src/memory.md2
-rw-r--r--src/doc/rustc-dev-guide/src/ty-fold.md6
3 files changed, 10 insertions, 8 deletions
diff --git a/src/doc/rustc-dev-guide/src/bug-fix-procedure.md b/src/doc/rustc-dev-guide/src/bug-fix-procedure.md
index e29ad26e066..b4159097c0c 100644
--- a/src/doc/rustc-dev-guide/src/bug-fix-procedure.md
+++ b/src/doc/rustc-dev-guide/src/bug-fix-procedure.md
@@ -120,7 +120,7 @@ future-compatibility warnings. These are a special category of lint warning.
 Adding a new future-compatibility warning can be done as follows.
 
 ```rust
-// 1. Define the lint in `src/librustc_middle/lint/builtin.rs`:
+// 1. Define the lint in `src/librustc/lint/builtin.rs`:
 declare_lint! {
     pub YOUR_ERROR_HERE,
     Warn,
@@ -230,12 +230,14 @@ lint name is mentioned (in the compiler, we use the upper-case name, and a macro
 automatically generates the lower-case string; so searching for
 `overlapping_inherent_impls` would not find much).
 
+> NOTE: these exact files don't exist anymore, but the procedure is still the same.
+
 #### Remove the lint.
 
 The first reference you will likely find is the lint definition [in
-`librustc_middle/lint/builtin.rs` that resembles this][defsource]:
+`librustc/lint/builtin.rs` that resembles this][defsource]:
 
-[defsource]: https://github.com/rust-lang/rust/blob/085d71c3efe453863739c1fb68fd9bd1beff214f/src/librustc_middle/lint/builtin.rs#L171-L175
+[defsource]: https://github.com/rust-lang/rust/blob/085d71c3efe453863739c1fb68fd9bd1beff214f/src/librustc/lint/builtin.rs#L171-L175
 
 ```rust
 declare_lint! {
@@ -249,7 +251,7 @@ This `declare_lint!` macro creates the relevant data structures. Remove it. You
 will also find that there is a mention of `OVERLAPPING_INHERENT_IMPLS` later in
 the file as [part of a `lint_array!`][lintarraysource]; remove it too,
 
-[lintarraysource]: https://github.com/rust-lang/rust/blob/085d71c3efe453863739c1fb68fd9bd1beff214f/src/librustc_middle/lint/builtin.rs#L252-L290
+[lintarraysource]: https://github.com/rust-lang/rust/blob/085d71c3efe453863739c1fb68fd9bd1beff214f/src/librustc/lint/builtin.rs#L252-L290
 
 Next, you see see [a reference to `OVERLAPPING_INHERENT_IMPLS` in
 `librustc_lint/lib.rs`][futuresource]. This defining the lint as a "future
diff --git a/src/doc/rustc-dev-guide/src/memory.md b/src/doc/rustc-dev-guide/src/memory.md
index 533d1337e2f..620b7d858e9 100644
--- a/src/doc/rustc-dev-guide/src/memory.md
+++ b/src/doc/rustc-dev-guide/src/memory.md
@@ -16,7 +16,7 @@ types for equality: for each interned type `X`, we implemented [`PartialEq for
 X`][peqimpl], so we can just compare pointers. The [`CtxtInterners`] type
 contains a bunch of maps of interned types and the arena itself.
 
-[peqimpl]: https://github.com/rust-lang/rust/blob/3ee936378662bd2e74be951d6a7011a95a6bd84d/src/librustc_middle/ty/mod.rs#L528-L534
+[peqimpl]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyS.html#implementations
 [`CtxtInterners`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.CtxtInterners.html#structfield.arena
 
 ### Example: `ty::TyS`
diff --git a/src/doc/rustc-dev-guide/src/ty-fold.md b/src/doc/rustc-dev-guide/src/ty-fold.md
index f769ee638c2..5b409e8ecab 100644
--- a/src/doc/rustc-dev-guide/src/ty-fold.md
+++ b/src/doc/rustc-dev-guide/src/ty-fold.md
@@ -93,13 +93,13 @@ defined
 [here](https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs).
 
 **`subst`** In the case of substitutions the [actual
-folder](https://github.com/rust-lang/rust/blob/04e69e4f4234beb4f12cc76dcc53e2cc4247a9be/src/librustc_middle/ty/subst.rs#L467-L482)
+folder](https://github.com/rust-lang/rust/blob/75ff3110ac6d8a0259023b83fd20d7ab295f8dd6/src/librustc_middle/ty/subst.rs#L440-L451)
 is going to be doing the indexing we’ve already mentioned. There we define a `Folder` and call
 `fold_with` on the `TypeFoldable` to process yourself.  Then
-[fold_ty](https://github.com/rust-lang/rust/blob/04e69e4f4234beb4f12cc76dcc53e2cc4247a9be/src/librustc_middle/ty/subst.rs#L545-L573)
+[fold_ty](https://github.com/rust-lang/rust/blob/75ff3110ac6d8a0259023b83fd20d7ab295f8dd6/src/librustc_middle/ty/subst.rs#L512-L536)
 the method that process each type it looks for a `ty::Param` and for those it replaces it for
 something from the list of substitutions, otherwise recursively process the type.  To replace it,
 calls
-[ty_for_param](https://github.com/rust-lang/rust/blob/04e69e4f4234beb4f12cc76dcc53e2cc4247a9be/src/librustc_middle/ty/subst.rs#L589-L624)
+[ty_for_param](https://github.com/rust-lang/rust/blob/75ff3110ac6d8a0259023b83fd20d7ab295f8dd6/src/librustc_middle/ty/subst.rs#L552-L587)
 and all that does is index into the list of substitutions with the index of the `Param`.