Skip to content

Commit bcb8657

Browse files
committed
rustdoc: Collapse before unindenting
Doesn't make much sense to unindent each line individually and *then* collapse them all together.
1 parent e7fa081 commit bcb8657

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/librustdoc/passes.rs

-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ pub fn collapse_docs(crate: clean::Crate) -> plugins::PluginResult {
173173
(crate, None)
174174
}
175175

176-
// n.b. this is copied from src/librustdoc/unindent_pass.rs
177176
pub fn unindent(s: &str) -> ~str {
178177
let lines = s.any_line_iter().collect::<~[&str]>();
179178
let mut saw_first_line = false;

src/librustdoc/rustdoc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ static PASSES: &'static [Pass] = &[
6161
];
6262

6363
static DEFAULT_PASSES: &'static [&'static str] = &[
64-
"unindent-comments",
65-
"collapse-docs",
6664
"strip-hidden",
6765
"strip-private",
66+
"collapse-docs",
67+
"unindent-comments",
6868
];
6969

7070
local_data_key!(pub ctxtkey: @core::DocContext)

0 commit comments

Comments
 (0)