diff --git a/clippy_config/src/metadata.rs b/clippy_config/src/metadata.rs index 400887185e8..8e78aee9d2e 100644 --- a/clippy_config/src/metadata.rs +++ b/clippy_config/src/metadata.rs @@ -13,7 +13,7 @@ impl fmt::Display for ClippyConfiguration { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "- `{}`: {}", self.name, self.doc)?; if !self.default.is_empty() { - write!(f, " (default: `{}`)", self.default)?; + write!(f, "\n\n(default: `{}`)", self.default)?; } Ok(()) } diff --git a/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/clippy_lints/src/utils/internal_lints/metadata_collector.rs index 1c149f20456..54cab716fbd 100644 --- a/clippy_lints/src/utils/internal_lints/metadata_collector.rs +++ b/clippy_lints/src/utils/internal_lints/metadata_collector.rs @@ -167,7 +167,7 @@ fn get_lint_configs(&self, lint_name: &str) -> Option { .iter() .filter(|config| config.lints.iter().any(|lint| lint == lint_name)) .map(ToString::to_string) - .reduce(|acc, x| acc + &x) + .reduce(|acc, x| acc + "\n\n" + &x) .map(|configurations| { format!( r#"