Skip to content

Commit 47d9f49

Browse files
Remove rust flags from doc block
1 parent 3157691 commit 47d9f49

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc_driver/lib.rs

Lines changed: 7 additions & 1 deletion
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)