about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-10-24 22:55:02 +0000
committerbors <bors@rust-lang.org>2024-10-24 22:55:02 +0000
commit3dc1b9f5c00ca5535505c1ec46ccd43b8d9cfa19 (patch)
tree7385a94c35b90eedfd99deb9f59525fcb378ae55
parenta93c1718c80b9f100056c8eec3fc37fbd6424134 (diff)
parentdf8551b60aa2b3442ccda21ac5a8bcabd2a7d67c (diff)
downloadrust-3dc1b9f5c00ca5535505c1ec46ccd43b8d9cfa19.tar.gz
rust-3dc1b9f5c00ca5535505c1ec46ccd43b8d9cfa19.zip
Auto merge of #132007 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/edition-guide

7 commits in c7ebae25cb4801a31b6f05353f6d85bfa6feedd1..1f07c242f8162a711a5ac5a4ea8fa7ec884ee7a9
2024-10-21 14:29:49 UTC to 2024-10-19 19:08:20 UTC

- 2024: Add reserved syntax (rust-lang/edition-guide#326)
- Update stdout of `cargo new` (rust-lang/edition-guide#327)
- Don't run doctests on rustfmt ident sorting page
- add rustfmt raw identifer sorting doc (rust-lang/edition-guide#321)
- Add some tips for what to be careful of with rustdoc-doctests (rust-lang/edition-guide#323)
- Remove cargo-remove-implicit-features (rust-lang/edition-guide#324)
- Rename doctest standalone tag (rust-lang/edition-guide#325)

## rust-embedded/book

1 commits in f40a8b420ec4b4505d9489965e261f1d5c28ba23..ddbf1b4e2858fedb71b7c42eb15c4576517dc125
2024-10-13 19:53:37 UTC to 2024-10-13 19:53:37 UTC

- Add link to Cortex-M comparison to install.md (rust-embedded/book#378)

## rust-lang/reference

29 commits in c64e52a3d306eac0129f3ad6c6d8806ab99ae2e9..23ce619966541bf2c80d45fdfeecf3393e360a13
2024-10-05 00:33:03 +0000 to 2024-10-22 21:34:51 +0000
- Mention `--print cfg` under set configuration options (rust-lang/reference#1636)
- Fix `pat` fragment specifier to be the "current" edition (rust-lang/reference#1640)
- Add restriction for cfg_attr with crate_type and crate_name (rust-lang/reference#1649)
- Sort macro fragment specifiers (rust-lang/reference#1641)
- Document mixed-site hygiene (rust-lang/reference#1656)
- Clarify that "macro attributes" refers to proc macros (rust-lang/reference#1660)
- mdbook-spec: Fix Spec::new creation (rust-lang/reference#1658)
- Fix stdcall example broken by recent rustc change (rust-lang/reference#1659)
- Add spec identifiers to const_eval.md (rust-lang/reference#1569)
- Add identifier syntax to trait-bounds.md (rust-lang/reference#1631)
- Add identifier syntax to macro-ambiguity.md (rust-lang/reference#1634)
- Add spec identifier syntax to conditional-compilation.md (rust-lang/reference#1564)
- Add spec identifiers to behaviour-considered-undefined.md (rust-lang/reference#1562)
- Add test linking (rust-lang/reference#1646)
- Allow `deny` inside `forbid` as a no-op (rust-lang/reference#1655)
- Add identifier syntax to identifiers.md (rust-lang/reference#1583)
- Add spec identifiers to crates-and-source-files.md (rust-lang/reference#1570)
- Add identifier syntax to linkage.md (rust-lang/reference#1633)
- Add identifier syntax to type-coercions.md (rust-lang/reference#1632)
- Add identifiers to variables.md (rust-lang/reference#1626)
- Add identifier syntax to lexer chapters (rust-lang/reference#1620)
- Add spec identifier syntax to `unsafe-keyword.md` and `unsafety.md` (rust-lang/reference#1619)
- Add identifier syntax to types and subchapters. (rust-lang/reference#1618)
- Add identifier syntax to subtyping.md (rust-lang/reference#1613)
- Add identifier syntax to statements.md (rust-lang/reference#1611)
- Add identifier syntax to type-layout.md (rust-lang/reference#1614)
- Clarify definition of "immutable bytes" (rust-lang/reference#1637)
- Add preview artifacts in CI (rust-lang/reference#1647)
- trait bounds grammar: make `?` and `for&lt;&gt;` mutually exclusive (rust-lang/reference#1650)

## rust-lang/rustc-dev-guide

5 commits in 07bc9ca9eb1cd6d9fbbf758c2753b748804a134f..59d94ea75a0b157e148af14c73c2dd60efb7b60a
2024-10-21 02:30:07 UTC to 2024-10-07 21:12:09 UTC

- Add the WASM | WASI | Emscripten notification groups (rust-lang/rustc-dev-guide#2100)
- Update bootstrapping.md (rust-lang/rustc-dev-guide#1900)
- Rename `needs-profiler-support` to `needs-profiler-runtime` (rust-lang/rustc-dev-guide#2095)
- Document compiletest directives `ignore-coverage-map` and `ignore-coverage-run` (rust-lang/rustc-dev-guide#2094)
- Purge `run-pass-valgrind` mentions (rust-lang/rustc-dev-guide#2091)
-rw-r--r--src/bootstrap/src/core/build_steps/doc.rs9
m---------src/doc/edition-guide0
m---------src/doc/embedded-book0
m---------src/doc/reference0
m---------src/doc/rustc-dev-guide0
-rw-r--r--src/tools/rustbook/Cargo.lock3
-rw-r--r--src/tools/rustbook/src/main.rs9
7 files changed, 18 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs
index ca2b8742647..69ec832a44a 100644
--- a/src/bootstrap/src/core/build_steps/doc.rs
+++ b/src/bootstrap/src/core/build_steps/doc.rs
@@ -170,7 +170,14 @@ impl<P: Step> Step for RustbookSrc<P> {
                 builder.add_rustc_lib_path(compiler, &mut rustbook_cmd);
             }
 
-            rustbook_cmd.arg("build").arg(&src).arg("-d").arg(&out).run(builder);
+            rustbook_cmd
+                .arg("build")
+                .arg(&src)
+                .arg("-d")
+                .arg(&out)
+                .arg("--rust-root")
+                .arg(&builder.src)
+                .run(builder);
 
             for lang in &self.languages {
                 let out = out.join(lang);
diff --git a/src/doc/edition-guide b/src/doc/edition-guide
-Subproject c7ebae25cb4801a31b6f05353f6d85bfa6feedd
+Subproject 1f07c242f8162a711a5ac5a4ea8fa7ec884ee7a
diff --git a/src/doc/embedded-book b/src/doc/embedded-book
-Subproject f40a8b420ec4b4505d9489965e261f1d5c28ba2
+Subproject ddbf1b4e2858fedb71b7c42eb15c4576517dc12
diff --git a/src/doc/reference b/src/doc/reference
-Subproject c64e52a3d306eac0129f3ad6c6d8806ab99ae2e
+Subproject 23ce619966541bf2c80d45fdfeecf3393e360a1
diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide
-Subproject 07bc9ca9eb1cd6d9fbbf758c2753b748804a134
+Subproject 59d94ea75a0b157e148af14c73c2dd60efb7b60
diff --git a/src/tools/rustbook/Cargo.lock b/src/tools/rustbook/Cargo.lock
index 060deb18344..27ccb205b50 100644
--- a/src/tools/rustbook/Cargo.lock
+++ b/src/tools/rustbook/Cargo.lock
@@ -1,6 +1,6 @@
 # This file is automatically @generated by Cargo.
 # It is not intended for manual editing.
-version = 3
+version = 4
 
 [[package]]
 name = "adler2"
@@ -704,6 +704,7 @@ dependencies = [
  "semver",
  "serde_json",
  "tempfile",
+ "walkdir",
 ]
 
 [[package]]
diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs
index 2118af61396..f905b9277ff 100644
--- a/src/tools/rustbook/src/main.rs
+++ b/src/tools/rustbook/src/main.rs
@@ -22,6 +22,11 @@ fn main() {
     .required(false)
     .value_parser(clap::value_parser!(String));
 
+    let root_arg = arg!(--"rust-root" <ROOT_DIR>
+"Path to the root of the rust source tree")
+    .required(false)
+    .value_parser(clap::value_parser!(PathBuf));
+
     let dir_arg = arg!([dir] "Root directory for the book\n\
                               (Defaults to the current directory when omitted)")
     .value_parser(clap::value_parser!(PathBuf));
@@ -37,6 +42,7 @@ fn main() {
                 .about("Build the book from the markdown files")
                 .arg(d_arg)
                 .arg(l_arg)
+                .arg(root_arg)
                 .arg(&dir_arg),
         )
         .subcommand(
@@ -96,7 +102,8 @@ pub fn build(args: &ArgMatches) -> Result3<()> {
     }
 
     if book.config.get_preprocessor("spec").is_some() {
-        book.with_preprocessor(Spec::new());
+        let rust_root = args.get_one::<PathBuf>("rust-root").cloned();
+        book.with_preprocessor(Spec::new(rust_root)?);
     }
 
     book.build()?;