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 {
9191 CharRange :: Digit => Some ( "is_ascii_digit" ) ,
9292 CharRange :: Otherwise => None ,
9393 } {
94- let mut applicability = Applicability :: MaybeIncorrect ;
9594 let default_snip = ".." ;
9695 // `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.
9897 let recv = snippet ( cx, recv. span , default_snip) ;
9998
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+ } ;
103104
104105 span_lint_and_sugg (
105106 cx,
You can’t perform that action at this time.
0 commit comments