@@ -10,7 +10,8 @@ use rustc_lexer::unescape::{self, EscapeError};
10
10
use rustc_lint:: { EarlyContext , EarlyLintPass } ;
11
11
use rustc_parse:: parser;
12
12
use 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 } ;
14
15
15
16
declare_clippy_lint ! {
16
17
/// **What it does:** This lint warns when you use `println!("")` to
@@ -301,7 +302,7 @@ impl EarlyLintPass for Write {
301
302
}
302
303
} else if mac. path == sym ! ( writeln) {
303
304
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 {
305
306
let mut applicability = Applicability :: MachineApplicable ;
306
307
// FIXME: remove this `#[allow(...)]` once the issue #5822 gets fixed
307
308
#[ allow( clippy:: option_if_let_else) ]
@@ -484,7 +485,7 @@ impl Write {
484
485
485
486
fn lint_println_empty_string ( & self , cx : & EarlyContext < ' _ > , mac : & MacCall ) {
486
487
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 {
488
489
let name = mac. path . segments [ 0 ] . ident . name ;
489
490
span_lint_and_sugg (
490
491
cx,
0 commit comments