File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -91,15 +91,16 @@ impl<'tcx> LateLintPass<'tcx> for ManualIsAsciiCheck {
91
91
CharRange :: Digit => Some ( "is_ascii_digit" ) ,
92
92
CharRange :: Otherwise => None ,
93
93
} {
94
- let mut applicability = Applicability :: MaybeIncorrect ;
95
94
let default_snip = ".." ;
96
95
// `snippet_with_applicability` may set applicability to `MaybeIncorrect` for
97
- // macro span, so we check applicability manually by comaring `recv` is not default.
96
+ // macro span, so we check applicability manually by comparing `recv` is not default.
98
97
let recv = snippet ( cx, recv. span , default_snip) ;
99
98
100
- if recv != default_snip {
101
- applicability = Applicability :: MachineApplicable ;
102
- }
99
+ let applicability = if recv == default_snip {
100
+ Applicability :: HasPlaceholders
101
+ } else {
102
+ Applicability :: MachineApplicable
103
+ } ;
103
104
104
105
span_lint_and_sugg (
105
106
cx,
You can’t perform that action at this time.
0 commit comments