mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 06:43:20 +03:00
Rollup merge of #40293 - malbarbo:rustdoctest, r=alexcrichton
Remove extra space in test description (of a mod test)
This commit is contained in:
@@ -422,8 +422,11 @@ pub fn add_test(&mut self, test: String,
|
||||
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)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user