about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-06-03 14:35:30 +0900
committerGitHub <noreply@github.com>2021-06-03 14:35:30 +0900
commitff0b7cd087970e710f003367ca1c83f6e1e06728 (patch)
treee7edeb61ff9958b86466e922acc5ca3da195a976
parent34f12758808024e41a5de9b64641a1bbf1818146 (diff)
parentdbff14b879a1c5c05b34e1a3af5fba192b383a24 (diff)
downloadrust-ff0b7cd087970e710f003367ca1c83f6e1e06728.tar.gz
rust-ff0b7cd087970e710f003367ca1c83f6e1e06728.zip
Rollup merge of #85852 - m-ou-se:machineapplicable-docs, r=nikomatsakis
Clarify meaning of MachineApplicable suggestions.

This documents the meaning of MachineApplicable in case of multiple suggestions, as described in https://github.com/rust-lang/rust/issues/53934#issuecomment-831396123

r? ``@nikomatsakis``
-rw-r--r--compiler/rustc_lint_defs/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_lint_defs/src/lib.rs b/compiler/rustc_lint_defs/src/lib.rs
index 70475563a4a..f1c4e5fb4a3 100644
--- a/compiler/rustc_lint_defs/src/lib.rs
+++ b/compiler/rustc_lint_defs/src/lib.rs
@@ -25,7 +25,11 @@ macro_rules! pluralize {
 /// before applying the suggestion.
 #[derive(Copy, Clone, Debug, PartialEq, Hash, Encodable, Decodable)]
 pub enum Applicability {
-    /// The suggestion is definitely what the user intended. This suggestion should be
+    /// The suggestion is definitely what the user intended, or maintains the exact meaning of the code.
+    /// This suggestion should be automatically applied.
+    ///
+    /// In case of multiple `MachineApplicable` suggestions (whether as part of
+    /// the same `multipart_suggestion` or not), all of them should be
     /// automatically applied.
     MachineApplicable,