]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #98463 - mystor:expand_expr_bool, r=eddyb
authorbors <bors@rust-lang.org>
Sun, 10 Jul 2022 14:02:45 +0000 (14:02 +0000)
committerbors <bors@rust-lang.org>
Sun, 10 Jul 2022 14:02:45 +0000 (14:02 +0000)
commit29554c0a120f6c1eb0c60f2a88c06faeb3d0f3c9
treea1c97773965a554cfc3d5fc958d832f3c67014df
parent268be96d6db196d79a1b2b8299a0485496e5a7ab
parentfb5b7b4af2c46a2ac2117a49b3209569e7b6ddad
Auto merge of #98463 - mystor:expand_expr_bool, r=eddyb

proc_macro: Fix expand_expr expansion of bool literals

Previously, the expand_expr method would expand bool literals as a
`Literal` token containing a `LitKind::Bool`, rather than as an `Ident`.
This is not a valid token, and the `LitKind::Bool` case needs to be
handled seperately.

Tests were added to more deeply compare the streams in the expand-expr
test suite to catch mistakes like this in the future.
compiler/rustc_expand/src/proc_macro_server.rs