]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #99337 - jsha:simplify-highlight, r=GuillaumeGomez
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Thu, 11 Aug 2022 05:44:52 +0000 (11:14 +0530)
committerGitHub <noreply@github.com>
Thu, 11 Aug 2022 05:44:52 +0000 (11:14 +0530)
rustdoc: simplify highlight.rs

Split render_with_highlighting, which took many optional parameters, into three functions for specific purposes, which each take a smaller number of mostly required parameters.

Remove some plumbing to pass through an "edition" parameter, which was used solely to avoid highlighting some 2021 Edition keywords in non-2021 code.

I've tested a build of std docs before and after, and this does not change the generated HTML at all.

Followup from https://github.com/rust-lang/rust/pull/91264#discussion_r901151101

r? ``@GuillaumeGomez``

1  2 
src/librustdoc/html/highlight.rs
src/librustdoc/html/markdown.rs
src/librustdoc/html/render/mod.rs
src/librustdoc/html/render/print_item.rs

Simple merge
Simple merge
Simple merge