]> 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)
commit826fb78bebc757acf138e86bd755e1d81c1d08bc
treeddc36f6bf471f91916a1fffa5ac70fd7b7bc5671
parent660e53512f1c25f03f6cf34fb620a7c0ed11d120
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
src/attr.rs
src/expr.rs