@@ -737,15 +737,15 @@ impl<'a> Parser<'a> {
737737 } ;
738738 self . last_unexpected_token_span = Some ( self . span ) ;
739739 let mut err = self . fatal ( & msg_exp) ;
740- if self . token . is_ident_named ( " and" ) {
740+ if self . token . is_ident_named ( sym :: and) {
741741 err. span_suggestion_short (
742742 self . span ,
743743 "use `&&` instead of `and` for the boolean operator" ,
744744 "&&" . to_string ( ) ,
745745 Applicability :: MaybeIncorrect ,
746746 ) ;
747747 }
748- if self . token . is_ident_named ( "or" ) {
748+ if self . token . is_ident_named ( sym :: or ) {
749749 err. span_suggestion_short (
750750 self . span ,
751751 "use `||` instead of `or` for the boolean operator" ,
@@ -3269,7 +3269,7 @@ impl<'a> Parser<'a> {
32693269 let ( span, e) = self . interpolated_or_expr_span ( e) ?;
32703270 ( lo. to ( span) , ExprKind :: Box ( e) )
32713271 }
3272- token:: Ident ( ..) if self . token . is_ident_named ( " not" ) => {
3272+ token:: Ident ( ..) if self . token . is_ident_named ( sym :: not) => {
32733273 // `not` is just an ordinary identifier in Rust-the-language,
32743274 // but as `rustc`-the-compiler, we can issue clever diagnostics
32753275 // for confused users who really want to say `!`
@@ -5147,15 +5147,15 @@ impl<'a> Parser<'a> {
51475147 let do_not_suggest_help =
51485148 self . token . is_keyword ( kw:: In ) || self . token == token:: Colon ;
51495149
5150- if self . token . is_ident_named ( " and" ) {
5150+ if self . token . is_ident_named ( sym :: and) {
51515151 e. span_suggestion_short (
51525152 self . span ,
51535153 "use `&&` instead of `and` for the boolean operator" ,
51545154 "&&" . to_string ( ) ,
51555155 Applicability :: MaybeIncorrect ,
51565156 ) ;
51575157 }
5158- if self . token . is_ident_named ( "or" ) {
5158+ if self . token . is_ident_named ( sym :: or ) {
51595159 e. span_suggestion_short (
51605160 self . span ,
51615161 "use `||` instead of `or` for the boolean operator" ,
0 commit comments