Skip to content

Commit

Permalink
Auto merge of rust-lang#132007 - rustbot:docs-update, r=ehuss
Browse files Browse the repository at this point in the history
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<>` 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)
  • Loading branch information
bors committed Oct 24, 2024
2 parents a93c171 + df8551b commit 3dc1b9f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
9 changes: 8 additions & 1 deletion src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/doc/embedded-book
2 changes: 1 addition & 1 deletion src/doc/reference
Submodule reference updated 57 files
+45 −4 .github/workflows/main.yml
+14 −2 README.md
+1 −0 book.toml
+16 −0 docs/authoring.md
+30 −1 mdbook-spec/Cargo.lock
+1 −0 mdbook-spec/Cargo.toml
+73 −60 mdbook-spec/src/lib.rs
+1 −3 mdbook-spec/src/main.rs
+115 −0 mdbook-spec/src/rules.rs
+203 −0 mdbook-spec/src/test_links.rs
+1 −0 src/SUMMARY.md
+1 −1 src/attributes.md
+3 −2 src/attributes/diagnostics.md
+95 −13 src/behavior-considered-undefined.md
+122 −11 src/conditional-compilation.md
+78 −7 src/const_eval.md
+31 −4 src/crates-and-source-files.md
+12 −0 src/destructors.md
+15 −0 src/identifiers.md
+3 −2 src/items/external-blocks.md
+2 −0 src/lexical-structure.md
+26 −0 src/linkage.md
+53 −0 src/macro-ambiguity.md
+50 −14 src/macros-by-example.md
+2 −0 src/statements-and-expressions.md
+35 −1 src/statements.md
+19 −1 src/subtyping.md
+5 −0 src/test-summary.md
+133 −2 src/tokens.md
+34 −4 src/trait-bounds.md
+54 −1 src/type-coercions.md
+101 −3 src/type-layout.md
+39 −3 src/types.md
+9 −2 src/types/array.md
+38 −2 src/types/boolean.md
+20 −0 src/types/closure.md
+7 −0 src/types/enum.md
+10 −2 src/types/function-item.md
+12 −2 src/types/function-pointer.md
+38 −2 src/types/impl-trait.md
+10 −2 src/types/inferred.md
+9 −2 src/types/never.md
+15 −0 src/types/numeric.md
+2 −0 src/types/parameters.md
+35 −0 src/types/pointer.md
+6 −0 src/types/slice.md
+8 −0 src/types/struct.md
+14 −1 src/types/textual.md
+16 −2 src/types/trait-object.md
+12 −0 src/types/tuple.md
+11 −1 src/types/union.md
+22 −0 src/unsafe-keyword.md
+17 −0 src/unsafety.md
+7 −0 src/variables.md
+5 −0 src/whitespace.md
+30 −0 theme/reference.css
+24 −0 theme/reference.js
3 changes: 2 additions & 1 deletion src/tools/rustbook/Cargo.lock
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -704,6 +704,7 @@ dependencies = [
"semver",
"serde_json",
"tempfile",
"walkdir",
]

[[package]]
Expand Down
9 changes: 8 additions & 1 deletion src/tools/rustbook/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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(
Expand Down Expand Up @@ -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()?;
Expand Down

0 comments on commit 3dc1b9f

Please sign in to comment.