]> git.lizzy.rs Git - rust.git/commit
Remove `token::Lit` from `ast::MetaItemLit`.
authorNicholas Nethercote <n.nethercote@gmail.com>
Tue, 29 Nov 2022 02:36:00 +0000 (13:36 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Fri, 2 Dec 2022 02:49:19 +0000 (13:49 +1100)
commitc91dd22870d40315c3e0e5b45077516286e918fd
tree92764d2075648883c9c1f191bab4ab2a02d4aba3
parentc7e4abd44469d20fad3033608d7ece501609ed34
Remove `token::Lit` from `ast::MetaItemLit`.

`token::Lit` contains a `kind` field that indicates what kind of literal
it is. `ast::MetaItemLit` currently wraps a `token::Lit` but also has
its own `kind` field. This means that `ast::MetaItemLit` encodes the
literal kind in two different ways.

This commit changes `ast::MetaItemLit` so it no longer wraps
`token::Lit`. It now contains the `symbol` and `suffix` fields from
`token::Lit`, but not the `kind` field, eliminating the redundancy.
src/attr.rs