pub enum Applicability {
MachineApplicable,
MaybeIncorrect,
HasPlaceholders,
Unspecified,
}Expand description
How confident we are that a suggested fix is correct.
This follows rustc’s conventions for suggestion applicability levels. IDEs and tools can use this to decide whether to auto-apply suggestions.
Variants§
MachineApplicable
The suggestion is definitely correct and can be safely auto-applied.
Use this when the fix is guaranteed to compile and preserve semantics.
MaybeIncorrect
The suggestion might be correct but should be reviewed by a human.
Use this when the fix will likely work but may change behavior in edge cases, or when there are multiple equally valid options.
HasPlaceholders
The suggestion contains placeholders that the user must fill in.
Use this when the fix shows the general shape but needs specific values like variable names or types.
Unspecified
The suggestion is just a hint and may not even compile.
Use this for illustrative suggestions that show concepts rather than working code.
Trait Implementations§
Source§impl Clone for Applicability
impl Clone for Applicability
Source§fn clone(&self) -> Applicability
fn clone(&self) -> Applicability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more