Skip to content

Commit

Permalink
Rollup merge of #75743 - matklad:excl, r=davidtwco
Browse files Browse the repository at this point in the history
Rename rustc_lexer::TokenKind::Not to Bang

All other tokens are named by the punctuation they use, rather than
by semantics operation they stand for. `!` is the only exception to
the rule, let's fix it.
  • Loading branch information
cuviper authored Aug 20, 2020
2 parents 6ac1523 + 5299297 commit 2a3f43d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/librustc_lexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub enum TokenKind {
/// "="
Eq,
/// "!"
Not,
Bang,
/// "<"
Lt,
/// ">"
Expand Down Expand Up @@ -378,7 +378,7 @@ impl Cursor<'_> {
':' => Colon,
'$' => Dollar,
'=' => Eq,
'!' => Not,
'!' => Bang,
'<' => Lt,
'>' => Gt,
'-' => Minus,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_parse/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl<'a> StringReader<'a> {
rustc_lexer::TokenKind::Colon => token::Colon,
rustc_lexer::TokenKind::Dollar => token::Dollar,
rustc_lexer::TokenKind::Eq => token::Eq,
rustc_lexer::TokenKind::Not => token::Not,
rustc_lexer::TokenKind::Bang => token::Not,
rustc_lexer::TokenKind::Lt => token::Lt,
rustc_lexer::TokenKind::Gt => token::Gt,
rustc_lexer::TokenKind::Minus => token::BinOp(token::Minus),
Expand Down

0 comments on commit 2a3f43d

Please sign in to comment.