Skip to content

Commit 24e2ce3

Browse files
committed
Rollup merge of rust-lang#33410 - GuillaumeGomez:explain, r=Manishearth
Remove rust flags from doc block Fixes rust-lang#33405 r? @Manishearth
2 parents b8b1fa3 + 47d9f49 commit 24e2ce3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc_driver/lib.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,13 @@ fn handle_explain(code: &str,
352352
match descriptions.find_description(&normalised) {
353353
Some(ref description) => {
354354
// Slice off the leading newline and print.
355-
print!("{}", &description[1..]);
355+
print!("{}", &(&description[1..]).split("\n").map(|x| {
356+
format!("{}\n", if x.starts_with("```") {
357+
"```"
358+
} else {
359+
x
360+
})
361+
}).collect::<String>());
356362
}
357363
None => {
358364
early_error(output, &format!("no extended information for {}", code));

0 commit comments

Comments
 (0)