From 232e2b79f2e76cc7e1c76e0d35968711960dedee Mon Sep 17 00:00:00 2001 From: xFrednet Date: Tue, 5 Jan 2021 23:59:14 +0100 Subject: [PATCH] Added documentation to the multispan_sugg method --- clippy_utils/src/diagnostics.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clippy_utils/src/diagnostics.rs b/clippy_utils/src/diagnostics.rs index 73a2fa992b3f..7f827f1759d2 100644 --- a/clippy_utils/src/diagnostics.rs +++ b/clippy_utils/src/diagnostics.rs @@ -218,6 +218,11 @@ where multispan_sugg_with_applicability(diag, help_msg, Applicability::Unspecified, sugg) } +/// Create a suggestion made from several `span → replacement`. +/// +/// rustfix currently doesn't support the automatic application of suggestions with +/// multiple spans. This is tracked in issue [rustfix#141](https://github.com/rust-lang/rustfix/issues/141). +/// Suggestions with multiple spans will be silently ignored. pub fn multispan_sugg_with_applicability( diag: &mut DiagnosticBuilder<'_>, help_msg: &str,