Skip to content

Commit

Permalink
Rollup merge of rust-lang#33410 - GuillaumeGomez:explain, r=Manishearth
Browse files Browse the repository at this point in the history
Remove rust flags from doc block

Fixes rust-lang#33405

r? @Manishearth
  • Loading branch information
steveklabnik committed May 5, 2016
2 parents b8b1fa3 + 47d9f49 commit 24e2ce3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,13 @@ fn handle_explain(code: &str,
match descriptions.find_description(&normalised) {
Some(ref description) => {
// Slice off the leading newline and print.
print!("{}", &description[1..]);
print!("{}", &(&description[1..]).split("\n").map(|x| {
format!("{}\n", if x.starts_with("```") {
"```"
} else {
x
})
}).collect::<String>());
}
None => {
early_error(output, &format!("no extended information for {}", code));
Expand Down

0 comments on commit 24e2ce3

Please sign in to comment.