about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-05-04 02:16:39 +0800
committerkennytm <kennytm@gmail.com>2018-05-04 02:16:39 +0800
commit4cc4a67cea385194ff0fd0d400bba894beceb759 (patch)
treed782627ea4d4f28298090fc87a2128c0c51a3282 /src/libsyntax/parse/parser.rs
parentdfb32af87d9524caae3edb2c74d6165380eda063 (diff)
parent8e38d02d986a5fa5ef51b6995058d7327aa0da4b (diff)
downloadrust-4cc4a67cea385194ff0fd0d400bba894beceb759.tar.gz
rust-4cc4a67cea385194ff0fd0d400bba894beceb759.zip
Rollup merge of #50406 - ExpHP:concat-nonzero-idents, r=dtolnay
Forbid constructing empty identifiers from concat_idents

The empty identifier is a [reserved identifier](https://github.com/rust-lang/rust/blob/8a37c75a3a661385cc607d934c70e86a9eaf5fd7/src/libsyntax_pos/symbol.rs#L300-L305) in rust, apparently used for black magicks like representing the crate root or somesuch... and therefore, being able to construct it is Ungood.  Presumably.

...even if the macro that lets you construct it is so useless that you can't actually do any damage with it. (and believe me, I tried)

Fixes #50403.

**Note:** I noticed that when you try to do something similar with `proc_macro::Term`, the compiler actually catches it and flags the identifier as reserved.  Perhaps a better solution would be to somehow have that same check applied here.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions