Skip to content

Commit 3329715

Browse files
authored
Fix some links (rust-lang#1865)
1 parent f8f61f9 commit 3329715

11 files changed

+26
-26
lines changed

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# The Rust Code of Conduct
22

3-
This repository follows the [Code of Conduct](https://www.rust-lang.org/conduct.html) of the Rust organization.
3+
This repository follows the [Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct) of the Rust organization.

src/appendix/background.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ does not.
310310
## Books
311311
- [Types and Programming Languages](https://www.cis.upenn.edu/~bcpierce/tapl/)
312312
- [Programming Language Pragmatics](https://www.cs.rochester.edu/~scott/pragmatics/)
313-
- [Practical Foundations for Programming Languages](https://www.cs.cmu.edu/~rwh/pfpl/2nded.pdf)
313+
- [Practical Foundations for Programming Languages](https://www.cs.cmu.edu/~rwh/pfpl/)
314314
- [Compilers: Principles, Techniques, and Tools, 2nd Edition](https://www.pearson.com/us/higher-education/program/Aho-Compilers-Principles-Techniques-and-Tools-2nd-Edition/PGM167067.html)
315315
- [Garbage Collection: Algorithms for Automatic Dynamic Memory Management](https://www.cs.kent.ac.uk/people/staff/rej/gcbook/)
316316
- [Linkers and Loaders](https://www.amazon.com/Linkers-Kaufmann-Software-Engineering-Programming/dp/1558604960) (There are also free versions of this, but the version we had linked seems to be offline at the moment.)

src/constants.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Constants in the type system
22

33
Constants used in the type system are represented as [`ty::Const`].
4-
The variants of their [`ty::ConstKind`] mostly mirror the variants of [`ty::TyKind`]
4+
The variants of their [`const_kind::ConstKind`] mostly mirror the variants of [`ty_kind::TyKind`]
55
with the two *additional* variants being `ConstKind::Value` and `ConstKind::Unevaluated`.
66

77
## `WithOptConstParam` and dealing with the query system
@@ -77,6 +77,6 @@ the constant doesn't use them in any way. This can cause
7777
[some interesting errors][pcg-unused-substs] and breaks some already stable code.
7878

7979
[`ty::Const`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Const.html
80-
[`ty::ConstKind`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.ConstKind.html
81-
[`ty::TyKind`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html
80+
[`const_kind::ConstKind`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/const_kind/enum.ConstKind.html
81+
[`ty_kind::TyKind`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html
8282
[pcg-unused-substs]: https://github.com/rust-lang/project-const-generics/issues/33

src/diagnostics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ declare_lint! {
689689
This makes the `ANONYMOUS_PARAMETERS` lint allow-by-default in the 2015 edition
690690
but warn-by-default in the 2018 edition.
691691

692-
See [Edition-specific lints](../guides/editions.md#edition-specific-lints) for more information.
692+
See [Edition-specific lints](./guides/editions.md#edition-specific-lints) for more information.
693693

694694
### Feature-gated lints
695695

src/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ chapter on how to build and run the compiler](./building/how-to-build-and-run.md
1515
[internals]: https://internals.rust-lang.org
1616
[rust-discord]: http://discord.gg/rust-lang
1717
[rust-zulip]: https://rust-lang.zulipchat.com
18-
[coc]: https://www.rust-lang.org/conduct.html
18+
[coc]: https://www.rust-lang.org/policies/code-of-conduct
1919
[walkthrough]: ./walkthrough.md
2020
[Getting Started]: ./getting-started.md
2121

src/identifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ See the [HIR chapter][hir-map] for more detailed information.
9696
[`Local`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Local.html
9797
[`LocalDecl`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.LocalDecl.html
9898
[`Body.local_decls`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Body.html#structfield.local_decls
99-
[`FieldIdx`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/struct.FieldIdx.html
99+
[`FieldIdx`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/abi/struct.FieldIdx.html
100100
[`Place`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Place.html
101101
[`SourceScope`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.SourceScope.html
102102
[`SourceScopeData`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.SourceScopeData.html

src/mir/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,5 +351,5 @@ See the const-eval WG's [docs on promotion](https://github.com/rust-lang/const-e
351351
[`ProjectionElem::Deref`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.ProjectionElem.html#variant.Deref
352352
[`Rvalue`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.Rvalue.html
353353
[`Operand`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.Operand.html
354-
[`mir::Constant`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Constant.html
354+
[`mir::Constant`]: https://doc.rust-lang.org/nightly/nightly-rustc/stable_mir/mir/struct.Constant.html
355355
[`ty::Const`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Const.html

src/solve/trait-solving.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ For success and ambiguity it also returns constraints inference and region const
4343
[`Goal`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/solve/struct.Goal.html
4444
[`Predicate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Predicate.html
4545
[`Candidate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/solve/assembly/struct.Candidate.html
46-
[`CandidateSource`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/solve/assembly/enum.CandidateSource.html
46+
[`CandidateSource`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/solve/enum.CandidateSource.html
4747
[`CanonicalResponse`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/solve/type.CanonicalResponse.html

src/tests/running.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,4 @@ $ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/ ./x.py test compiler/rustc_code
352352
```
353353

354354
If you encounter bugs or problems, don't hesitate to open issues on
355-
[rustc_codegen_gcc repository](github.com/rust-lang/rustc_codegen_gcc/).
355+
[rustc_codegen_gcc repository](https://github.com/rust-lang/rustc_codegen_gcc/).

src/traits/canonicalization.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Canonicalization
22

33
> **NOTE**: FIXME: The content of this chapter has some overlap with
4-
> [Next-gen trait solving Canonicalization chapter](../solve/canonicalization.html).
4+
> [Next-gen trait solving Canonicalization chapter](../solve/canonicalization.html).
55
> It is suggested to reorganize these contents in the future.
66
77
Canonicalization is the process of **isolating** an inference value
@@ -46,8 +46,8 @@ This query contains two unbound variables, but it also contains the
4646
lifetime `'static`. The trait system generally ignores all lifetimes
4747
and treats them equally, so when canonicalizing, we will *also*
4848
replace any [free lifetime](../appendix/background.html#free-vs-bound) with a
49-
canonical variable (Note that `'static` is actually a _free_ lifetime
50-
variable here. We are not considering it in the typing context of the whole
49+
canonical variable (Note that `'static` is actually a _free_ lifetime
50+
variable here. We are not considering it in the typing context of the whole
5151
program but only in the context of this trait reference. Mathematically, we
5252
are not quantifying over the whole program, but only this obligation).
5353
Therefore, we get the following result:
@@ -106,7 +106,7 @@ Remember that substitution S though! We're going to need it later.
106106

107107
OK, now that we have a fresh inference context and an instantiated
108108
query, we can go ahead and try to solve it. The trait solver itself is
109-
explained in more detail in [another section](./slg.html), but
109+
explained in more detail in [another section](../solve/the-solver.md), but
110110
suffice to say that it will compute a [certainty value][cqqr] (`Proven` or
111111
`Ambiguous`) and have side-effects on the inference variables we've
112112
created. For example, if there were only one impl of `Foo`, like so:

src/ty.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ the `ty::Ty` to be a thin pointer-like
133133
type. This allows us to do cheap comparisons for equality, along with the other
134134
benefits of interning.
135135

136-
[tykind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html
136+
[tykind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html
137137

138138
## Allocating and working with types
139139

@@ -253,16 +253,16 @@ There are many variants on the `TyKind` enum, which you can see by looking at it
253253
- [**And many more**...][kindvars]
254254

255255
[wikiadt]: https://en.wikipedia.org/wiki/Algebraic_data_type
256-
[kindadt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Adt
257-
[kindforeign]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Foreign
258-
[kindstr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Str
259-
[kindslice]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Slice
260-
[kindarray]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Array
261-
[kindrawptr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.RawPtr
262-
[kindref]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Ref
263-
[kindparam]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Param
264-
[kinderr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Error
265-
[kindvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variants
256+
[kindadt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Adt
257+
[kindforeign]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Foreign
258+
[kindstr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Str
259+
[kindslice]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Slice
260+
[kindarray]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Array
261+
[kindrawptr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.RawPtr
262+
[kindref]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Ref
263+
[kindparam]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Param
264+
[kinderr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Error
265+
[kindvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variants
266266

267267
## Import conventions
268268

0 commit comments

Comments
 (0)