@@ -10,7 +10,8 @@ use rustc_lexer::unescape::{self, EscapeError};
1010use rustc_lint:: { EarlyContext , EarlyLintPass } ;
1111use rustc_parse:: parser;
1212use rustc_session:: { declare_tool_lint, impl_lint_pass} ;
13- use rustc_span:: { sym, BytePos , Span , Symbol } ;
13+ use rustc_span:: symbol:: kw;
14+ use rustc_span:: { sym, BytePos , Span } ;
1415
1516declare_clippy_lint ! {
1617 /// **What it does:** This lint warns when you use `println!("")` to
@@ -301,7 +302,7 @@ impl EarlyLintPass for Write {
301302 }
302303 } else if mac. path == sym ! ( writeln) {
303304 if let ( Some ( fmt_str) , expr) = self . check_tts ( cx, mac. args . inner_tokens ( ) , true ) {
304- if fmt_str. symbol == Symbol :: intern ( "" ) {
305+ if fmt_str. symbol == kw :: Empty {
305306 let mut applicability = Applicability :: MachineApplicable ;
306307 // FIXME: remove this `#[allow(...)]` once the issue #5822 gets fixed
307308 #[ allow( clippy:: option_if_let_else) ]
@@ -484,7 +485,7 @@ impl Write {
484485
485486 fn lint_println_empty_string ( & self , cx : & EarlyContext < ' _ > , mac : & MacCall ) {
486487 if let ( Some ( fmt_str) , _) = self . check_tts ( cx, mac. args . inner_tokens ( ) , false ) {
487- if fmt_str. symbol == Symbol :: intern ( "" ) {
488+ if fmt_str. symbol == kw :: Empty {
488489 let name = mac. path . segments [ 0 ] . ident . name ;
489490 span_lint_and_sugg (
490491 cx,
0 commit comments