From 6822bf380b80a75244583f926c4a37ead2c9bebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AC=E5=AF=92?= <10476912+hycinth22@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:01:19 +0800 Subject: [PATCH 1/3] fix dead links in memory.md --- src/memory.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/memory.md b/src/memory.md index e46a4a283..093d9edeb 100644 --- a/src/memory.md +++ b/src/memory.md @@ -52,8 +52,8 @@ represented as a slice `&'tcx [tcx.types.i32, tcx.types.u32]`). defined and discussed in depth in the `AdtDef and DefId` section. - [`Predicate`] defines something the trait system has to prove (see `traits` module). -[`GenericArgs`]: ./generic_arguments.html#GenericArgs -[`TraitRef`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TraitRef.html +[`GenericArgs`]: ./ty_module/generic_arguments.html#the-genericargs-type +[`TraitRef`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.TraitRef.html [`Predicate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Predicate.html [`ty::TyKind`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/sty/type.TyKind.html From 86eeea981cb6dc0a94fa88d59b6270c69a959971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AC=E5=AF=92?= <10476912+hycinth22@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:15:05 +0800 Subject: [PATCH 2/3] fix dead links in ty_module/generic_arguments.md --- src/ty_module/generic_arguments.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ty_module/generic_arguments.md b/src/ty_module/generic_arguments.md index ed2ba7bdd..3339d3114 100644 --- a/src/ty_module/generic_arguments.md +++ b/src/ty_module/generic_arguments.md @@ -37,7 +37,7 @@ for the generic parameters. In our example of `MyStruct`, we would end up ### **`AdtDef` and `DefId`** For every type defined in the source code, there is a unique `DefId` (see [this -chapter](hir.md#identifiers-in-the-hir)). This includes ADTs and generics. In the `MyStruct` +chapter](../hir.md#identifiers-in-the-hir)). This includes ADTs and generics. In the `MyStruct` definition we gave above, there are two `DefId`s: one for `MyStruct` and one for `T`. Notice that the code above does not generate a new `DefId` for `u32` because it is not defined in that code (it is only referenced). @@ -111,7 +111,7 @@ fn deal_with_generic_arg<'tcx>(generic_arg: GenericArg<'tcx>) -> GenericArg<'tcx [list]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.List.html [`GenericArg`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.GenericArg.html -[`GenericArgKind`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.GenericArgKind.html +[`GenericArgKind`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.GenericArgKind.html [`GenericArgs`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.GenericArgs.html So pulling it all together: From 73d9970dcfc4f9caa375bf21e9247845b7666aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AC=E5=AF=92?= <10476912+hycinth22@users.noreply.github.com> Date: Tue, 4 Jun 2024 13:00:06 +0800 Subject: [PATCH 3/3] Update src/memory.md use .md instead of .html for self-links Co-authored-by: Noah Lev --- src/memory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memory.md b/src/memory.md index 093d9edeb..b45a2a0c9 100644 --- a/src/memory.md +++ b/src/memory.md @@ -52,7 +52,7 @@ represented as a slice `&'tcx [tcx.types.i32, tcx.types.u32]`). defined and discussed in depth in the `AdtDef and DefId` section. - [`Predicate`] defines something the trait system has to prove (see `traits` module). -[`GenericArgs`]: ./ty_module/generic_arguments.html#the-genericargs-type +[`GenericArgs`]: ./ty_module/generic_arguments.md#the-genericargs-type [`TraitRef`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.TraitRef.html [`Predicate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Predicate.html