]> git.lizzy.rs Git - rust.git/commit
Rename some things related to literals.
authorNicholas Nethercote <n.nethercote@gmail.com>
Mon, 1 Aug 2022 06:46:08 +0000 (16:46 +1000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Tue, 16 Aug 2022 03:41:34 +0000 (13:41 +1000)
commit5d3cc1713a8816e3b4f10dc2cbaf910b16dc8763
tree77d1d426c31035de44e8f4622ee1308026ffa449
parentd7a041f6071a09bfcc5addcff4954985aef0bc31
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`.
13 files changed:
compiler/rustc_ast/src/ast.rs
compiler/rustc_ast/src/util/literal.rs
compiler/rustc_ast_lowering/src/lib.rs
compiler/rustc_ast_pretty/src/pprust/state.rs
compiler/rustc_builtin_macros/src/derive.rs
compiler/rustc_expand/src/mbe/metavar_expr.rs
compiler/rustc_expand/src/proc_macro_server.rs
compiler/rustc_hir_pretty/src/lib.rs
compiler/rustc_lint/src/hidden_unicode_codepoints.rs
compiler/rustc_parse/src/parser/expr.rs
src/tools/clippy/clippy_lints/src/octal_escapes.rs
src/tools/clippy/clippy_lints/src/write.rs
src/tools/rustfmt/src/expr.rs