Rename some things related to literals.
- Rename `ast::Lit::token` as `ast::Lit::token_lit`, because its type is
`token::Lit`, which is not a token. (This has been confusing me for a
long time.)
reasonable because we have an `ast::token::Lit` inside an `ast::Lit`.
- Rename `LitKind::{from,to}_lit_token` as
`LitKind::{from,to}_token_lit`, to match the above change and
`token::Lit`.
This commit is contained in:
@@ -120,8 +120,8 @@ impl EarlyLintPass for HiddenUnicodeCodepoints {
|
||||
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &ast::Expr) {
|
||||
// byte strings are already handled well enough by `EscapeError::NonAsciiCharInByteString`
|
||||
let (text, span, padding) = match &expr.kind {
|
||||
ast::ExprKind::Lit(ast::Lit { token, kind, span }) => {
|
||||
let text = token.symbol;
|
||||
ast::ExprKind::Lit(ast::Lit { token_lit, kind, span }) => {
|
||||
let text = token_lit.symbol;
|
||||
if !contains_text_flow_control_chars(text.as_str()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user