Skip to content

Commit

Permalink
Fix internal and incomplete links (#2107)
Browse files Browse the repository at this point in the history
* Fix broken link in syntax-intro.md

* Fix broken link in tests/compiletest.md

* Fix incorrectly formatted reference-style link in compiler-src.md

* Fix broken links to rustc-driver.md to point to rustc-driver/intro.md

* Define URLs for incomplete links to rustc sources in stabilization_guide.md

* Define link to coherence.md for incomplete link in solve/invariants.md
  • Loading branch information
thomasnyman authored Oct 31, 2024
1 parent 124513e commit fd1ce74
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/appendix/code-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Item | Kind | Short description | Chapter |
[The HIR]: ../hir.html
[Identifiers in the HIR]: ../hir.html#hir-id
[The parser]: ../the-parser.html
[The Rustc Driver and Interface]: ../rustc-driver.html
[The Rustc Driver and Interface]: ../rustc-driver/intro.html
[Type checking]: ../type-checking.html
[The `ty` modules]: ../ty.html
[Rustdoc]: ../rustdoc.html
Expand Down
2 changes: 1 addition & 1 deletion src/compiler-src.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ where the rustc source code lives.
## Workspace structure

The [`rust-lang/rust`] repository consists of a single large cargo workspace
containing the compiler, the standard libraries ([`core`], [`alloc`],[ `std`],
containing the compiler, the standard libraries ([`core`], [`alloc`], [`std`],
[`proc_macro`], [`etc`]), and [`rustdoc`], along with the build system and a
bunch of tools and submodules for building a full Rust distribution.

Expand Down
2 changes: 1 addition & 1 deletion src/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ structures (e.g. the [Abstract Syntax Tree (AST)][ast], [High-Level Intermediate
Representation (`HIR`)][hir], and the type system) and as such, arenas and
references are heavily relied upon to minimize unnecessary memory use. This
manifests itself in the way people can plug into the compiler (i.e. the
[driver](./rustc-driver.md)), preferring a "push"-style API (callbacks) instead
[driver](./rustc-driver/intro.md)), preferring a "push"-style API (callbacks) instead
of the more Rust-ic "pull" style (think the `Iterator` trait).

Thread-local storage and interning are used a lot through the compiler to reduce
Expand Down
4 changes: 2 additions & 2 deletions src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ the final binary.
[`Parser`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html
[`Pat`]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_ast/ast/struct.Pat.html
[`rustc_ast::ast`]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_ast/index.html
[`rustc_driver`]: rustc-driver.md
[`rustc_driver`]: rustc-driver/intro.md
[`rustc_interface::Config`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Config.html
[`rustc_lexer`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/index.html
[`rustc_parse::lexer`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/lexer/index.html
Expand Down Expand Up @@ -387,7 +387,7 @@ For more details on bootstrapping, see
# References

- Command line parsing
- Guide: [The Rustc Driver and Interface](rustc-driver.md)
- Guide: [The Rustc Driver and Interface](rustc-driver/intro.md)
- Driver definition: [`rustc_driver`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/)
- Main entry point: [`rustc_session::config::build_session_options`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_session/config/fn.build_session_options.html)
- Lexical Analysis: Lex the user program to a stream of tokens
Expand Down
5 changes: 3 additions & 2 deletions src/solve/invariants.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ in the trait solver

#### The type system is complete during the implicit negative overlap check in coherence ✅

For more on overlap checking: [../coherence.md]
For more on overlap checking: [coherence]

During the implicit negative overlap check in coherence we must never return *error* for
goals which can be proven. This would allow for overlapping impls with potentially different
Expand Down Expand Up @@ -153,4 +153,5 @@ arguments. This currently does not hold: [#97156].

[#57893]: https://github.com/rust-lang/rust/issues/57893
[#97156]: https://github.com/rust-lang/rust/issues/97156
[#114936]: https://github.com/rust-lang/rust/issues/114936
[#114936]: https://github.com/rust-lang/rust/issues/114936
[coherence]: ../coherence.md
2 changes: 2 additions & 0 deletions src/stabilization_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ if something { /* XXX */ }
[forge-versions]: https://forge.rust-lang.org/#current-release-versions
[forge-release-process]: https://forge.rust-lang.org/release/process.html
[`compiler/rustc_feature`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/index.html
[`compiler/rustc_feature/src/accepted.rs`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_feature/src/accepted.rs
[`compiler/rustc_feature/src/unstable.rs`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_feature/src/unstable.rs
[The Reference]: https://github.com/rust-lang/reference
[The Book]: https://github.com/rust-lang/book
[Rust by Example]: https://github.com/rust-lang/rust-by-example
Expand Down
2 changes: 1 addition & 1 deletion src/syntax-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ And parsing requires macro expansion, which in turn may require parsing the outp
[AST]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html
[macro expansion]: ./macro-expansion.md
[feature-gate checking]: ./feature-gate-ck.md
[lexing, parsing]: ./lexing-parsing.md
[lexing, parsing]: ./the-parser.md
[name resolution]: ./name-resolution.md
[validation]: ./ast-validation.md
2 changes: 1 addition & 1 deletion src/tests/compiletest.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on if or how to run the test, what behavior to expect, and more. See
[directives](directives.md) and the test suite documentation below for more details
on these annotations.

See the [Adding new tests](adding.md) and [Best practies](best-practiecs.md)
See the [Adding new tests](adding.md) and [Best practies](best-practices.md)
chapters for a tutorial on creating a new test and advice on writing a good
test, and the [Running tests](running.md) chapter on how to run the test suite.

Expand Down

0 comments on commit fd1ce74

Please sign in to comment.