diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-27 12:03:37 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-27 12:03:37 +1000 |
| commit | 5fd503ab445b2a70897026e495dd4df4343333eb (patch) | |
| tree | 3a11f2af6663ebc61d2b0d883a72e114cc76a799 /compiler/rustc_errors/src/markdown | |
| parent | 2b5621280c118ca72eb84470129c72b069e22907 (diff) | |
| download | rust-5fd503ab445b2a70897026e495dd4df4343333eb.tar.gz rust-5fd503ab445b2a70897026e495dd4df4343333eb.zip | |
Add `warn(unreachable_pub)` to `rustc_errors`.
Diffstat (limited to 'compiler/rustc_errors/src/markdown')
| -rw-r--r-- | compiler/rustc_errors/src/markdown/parse.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/markdown/term.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/markdown/parse.rs b/compiler/rustc_errors/src/markdown/parse.rs index 46f8959b6f2..b1db44dd215 100644 --- a/compiler/rustc_errors/src/markdown/parse.rs +++ b/compiler/rustc_errors/src/markdown/parse.rs @@ -74,7 +74,7 @@ enum ParseOpt { } /// Parse a buffer -pub fn entrypoint(txt: &str) -> MdStream<'_> { +pub(crate) fn entrypoint(txt: &str) -> MdStream<'_> { let ctx = Context { top_block: true, prev: Prev::Newline }; normalize(parse_recursive(txt.trim().as_bytes(), ctx), &mut Vec::new()) } diff --git a/compiler/rustc_errors/src/markdown/term.rs b/compiler/rustc_errors/src/markdown/term.rs index 06c1333d93d..579e00b8b85 100644 --- a/compiler/rustc_errors/src/markdown/term.rs +++ b/compiler/rustc_errors/src/markdown/term.rs @@ -15,7 +15,7 @@ thread_local! { } /// Print to terminal output to a buffer -pub fn entrypoint(stream: &MdStream<'_>, buf: &mut Buffer) -> io::Result<()> { +pub(crate) fn entrypoint(stream: &MdStream<'_>, buf: &mut Buffer) -> io::Result<()> { #[cfg(not(test))] if let Some((w, _)) = termize::dimensions() { WIDTH.with(|c| c.set(std::cmp::min(w, DEFAULT_COLUMN_WIDTH))); @@ -47,7 +47,7 @@ fn write_stream( Ok(()) } -pub fn write_tt(tt: &MdTree<'_>, buf: &mut Buffer, indent: usize) -> io::Result<()> { +fn write_tt(tt: &MdTree<'_>, buf: &mut Buffer, indent: usize) -> io::Result<()> { match tt { MdTree::CodeBlock { txt, lang: _ } => { buf.set_color(ColorSpec::new().set_dimmed(true))?; |
