From fd1ce7455fcc96d73b348ac0801783d0305321d1 Mon Sep 17 00:00:00 2001 From: Thomas Nyman Date: Thu, 31 Oct 2024 04:13:57 +0100 Subject: [PATCH] Fix internal and incomplete links (#2107) * 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 --- src/appendix/code-index.md | 2 +- src/compiler-src.md | 2 +- src/memory.md | 2 +- src/overview.md | 4 ++-- src/solve/invariants.md | 5 +++-- src/stabilization_guide.md | 2 ++ src/syntax-intro.md | 2 +- src/tests/compiletest.md | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/appendix/code-index.md b/src/appendix/code-index.md index a929be867..7cb7efc6b 100644 --- a/src/appendix/code-index.md +++ b/src/appendix/code-index.md @@ -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 diff --git a/src/compiler-src.md b/src/compiler-src.md index 784781ce9..c538fc8b7 100644 --- a/src/compiler-src.md +++ b/src/compiler-src.md @@ -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. diff --git a/src/memory.md b/src/memory.md index e8d30d5ca..67540924d 100644 --- a/src/memory.md +++ b/src/memory.md @@ -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 diff --git a/src/overview.md b/src/overview.md index b5e8753e5..af050a0e1 100644 --- a/src/overview.md +++ b/src/overview.md @@ -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 @@ -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 diff --git a/src/solve/invariants.md b/src/solve/invariants.md index 3d29b26ac..c16a3aeb2 100644 --- a/src/solve/invariants.md +++ b/src/solve/invariants.md @@ -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 @@ -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 \ No newline at end of file +[#114936]: https://github.com/rust-lang/rust/issues/114936 +[coherence]: ../coherence.md diff --git a/src/stabilization_guide.md b/src/stabilization_guide.md index 3a212b6d5..76da39509 100644 --- a/src/stabilization_guide.md +++ b/src/stabilization_guide.md @@ -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 diff --git a/src/syntax-intro.md b/src/syntax-intro.md index 6339a7e6b..0f5a91ee5 100644 --- a/src/syntax-intro.md +++ b/src/syntax-intro.md @@ -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 diff --git a/src/tests/compiletest.md b/src/tests/compiletest.md index 41cc141a2..efb48900d 100644 --- a/src/tests/compiletest.md +++ b/src/tests/compiletest.md @@ -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.