diff options
| author | bors <bors@rust-lang.org> | 2024-10-23 22:28:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-23 22:28:57 +0000 |
| commit | b8bb2968ce1e44d01520c9d59ee6299ed66df3f9 (patch) | |
| tree | 82ca49a2923c40b61c67ae4a6508390d25ec2a49 /src | |
| parent | 4f2f477fded0a47b21ed3f6aeddeafa5db8bf518 (diff) | |
| parent | fbe33e35aff61910178565013a7efbb4840e7629 (diff) | |
| download | rust-b8bb2968ce1e44d01520c9d59ee6299ed66df3f9.tar.gz rust-b8bb2968ce1e44d01520c9d59ee6299ed66df3f9.zip | |
Auto merge of #132079 - fmease:rollup-agrd358, r=fmease
Rollup of 9 pull requests
Successful merges:
- #130991 (Vectorized SliceContains)
- #131928 (rustdoc: Document `markdown` module.)
- #131955 (Set `signext` or `zeroext` for integer arguments on RISC-V and LoongArch64)
- #131979 (Minor tweaks to `compare_impl_item.rs`)
- #132036 (Add a test case for #131164)
- #132039 (Specialize `read_exact` and `read_buf_exact` for `VecDeque`)
- #132060 ("innermost", "outermost", "leftmost", and "rightmost" don't need hyphens)
- #132065 (Clarify documentation of `ptr::dangling()` function)
- #132066 (Fix a typo in documentation of `pointer::sub_ptr()`)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/rustc/src/symbol-mangling/v0.md | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/render/write_shared.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/markdown.rs | 12 |
4 files changed, 14 insertions, 4 deletions
diff --git a/src/doc/rustc/src/symbol-mangling/v0.md b/src/doc/rustc/src/symbol-mangling/v0.md index 6329e878c5c..109942518fc 100644 --- a/src/doc/rustc/src/symbol-mangling/v0.md +++ b/src/doc/rustc/src/symbol-mangling/v0.md @@ -1208,7 +1208,7 @@ The compiler has some latitude in how an entity is encoded as long as the symbol * Named functions, methods, and statics shall be represented by a *[path]* production. -* Paths should be rooted at the inner-most entity that can act as a path root. +* Paths should be rooted at the innermost entity that can act as a path root. Roots can be crate-ids, inherent impls, trait impls, and (for items within default methods) trait definitions. * The compiler is free to choose disambiguation indices and namespace tags from diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index 12b63460056..c82f7e9aaf9 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -112,7 +112,7 @@ pub(crate) fn write_shared( md_opts.output = cx.dst.clone(); md_opts.external_html = cx.shared.layout.external_html.clone(); try_err!( - crate::markdown::render(&index_page, md_opts, cx.shared.edition()), + crate::markdown::render_and_write(&index_page, md_opts, cx.shared.edition()), &index_page ); } diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 10fc0ea9990..cb9b3985bf6 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -817,7 +817,7 @@ fn main_args( return wrap_return( dcx, interface::run_compiler(config, |_compiler| { - markdown::render(&md_input, render_options, edition) + markdown::render_and_write(&md_input, render_options, edition) }), ); } diff --git a/src/librustdoc/markdown.rs b/src/librustdoc/markdown.rs index 978f96f38be..76eac084907 100644 --- a/src/librustdoc/markdown.rs +++ b/src/librustdoc/markdown.rs @@ -1,3 +1,13 @@ +//! Standalone markdown rendering. +//! +//! For the (much more common) case of rendering markdown in doc-comments, see +//! [crate::html::markdown]. +//! +//! This is used when [rendering a markdown file to an html file][docs], without processing +//! rust source code. +//! +//! [docs]: https://doc.rust-lang.org/stable/rustdoc/#using-standalone-markdown-files + use std::fmt::Write as _; use std::fs::{File, create_dir_all, read_to_string}; use std::io::prelude::*; @@ -33,7 +43,7 @@ fn extract_leading_metadata(s: &str) -> (Vec<&str>, &str) { /// (e.g., output = "bar" => "bar/foo.html"). /// /// Requires session globals to be available, for symbol interning. -pub(crate) fn render<P: AsRef<Path>>( +pub(crate) fn render_and_write<P: AsRef<Path>>( input: P, options: RenderOptions, edition: Edition, |
