1
Fork 0

Add warn(unreachable_pub) to rustc_errors.

This commit is contained in:
Nicholas Nethercote 2024-08-27 12:03:37 +10:00
parent 2b5621280c
commit 5fd503ab44
8 changed files with 36 additions and 35 deletions

View file

@ -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())
}

View file

@ -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))?;