]> git.lizzy.rs Git - rust.git/commit
Use `token::Lit` in `ast::ExprKind::Lit`.
authorNicholas Nethercote <n.nethercote@gmail.com>
Mon, 10 Oct 2022 02:40:56 +0000 (13:40 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Tue, 15 Nov 2022 22:41:28 +0000 (09:41 +1100)
commitf2d83ed1ac7254d943975fa57e54e6013d16eecf
treec2a73d64fac60a5a8a5ab57b58405ce0529c79b2
parent8a2d0f255d623390c9495dec1c9e5d22bc895e5d
Use `token::Lit` in `ast::ExprKind::Lit`.

Instead of `ast::Lit`.

Literal lowering now happens at two different times. Expression literals
are lowered when HIR is crated. Attribute literals are lowered during
parsing.

This commit changes the language very slightly. Some programs that used
to not compile now will compile. This is because some invalid literals
that are removed by `cfg` or attribute macros will no longer trigger
errors. See this comment for more details:
https://github.com/rust-lang/rust/pull/102944#issuecomment-1277476773
12 files changed:
clippy_lints/src/almost_complete_letter_range.rs
clippy_lints/src/int_plus_one.rs
clippy_lints/src/literal_representation.rs
clippy_lints/src/misc_early/literal_suffix.rs
clippy_lints/src/misc_early/mixed_case_hex_literals.rs
clippy_lints/src/misc_early/mod.rs
clippy_lints/src/misc_early/zero_prefixed_literal.rs
clippy_lints/src/octal_escapes.rs
clippy_lints/src/precedence.rs
clippy_lints/src/unused_rounding.rs
clippy_utils/src/ast_utils.rs
clippy_utils/src/numeric_literal.rs