diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 514c6d0e1da..d4f796ee3a7 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -524,13 +524,13 @@ fn handle_explain(code: &str, let mut text = String::new(); // Slice off the leading newline and print. - for line in description[1..].lines() { + for line in description.lines() { let indent_level = line.find(|c: char| !c.is_whitespace()) .unwrap_or_else(|| line.len()); let dedented_line = &line[indent_level..]; if dedented_line.starts_with("```") { is_in_code_block = !is_in_code_block; - text.push_str(&line[..(indent_level+3)]); + text.push_str(&line[..(indent_level + 3)]); } else if is_in_code_block && dedented_line.starts_with("# ") { continue; } else {