Skip to content

Commit

Permalink
Rollup merge of rust-lang#40293 - malbarbo:rustdoctest, r=alexcrichton
Browse files Browse the repository at this point in the history
Remove extra space in test description (of a mod test)
  • Loading branch information
GuillaumeGomez authored Mar 6, 2017
2 parents 24d0357 + 2e5b380 commit 10d8d68
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,11 @@ impl Collector {
as_test_harness: bool, compile_fail: bool, error_codes: Vec<String>,
line: usize, filename: String) {
let name = if self.use_headers {
let s = self.current_header.as_ref().map(|s| &**s).unwrap_or("");
format!("{} - {} (line {})", filename, s, line)
if let Some(ref header) = self.current_header {
format!("{} - {} (line {})", filename, header, line)
} else {
format!("{} - (line {})", filename, line)
}
} else {
format!("{} - {} (line {})", filename, self.names.join("::"), line)
};
Expand Down

0 comments on commit 10d8d68

Please sign in to comment.