]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #85359 - lrh2000:reserved-prefixes, r=nikomatsakis
authorbors <bors@rust-lang.org>
Sun, 27 Jun 2021 20:33:25 +0000 (20:33 +0000)
committerbors <bors@rust-lang.org>
Sun, 27 Jun 2021 20:33:25 +0000 (20:33 +0000)
Reserve prefixed identifiers and literals (RFC 3101)

This PR denies any identifiers immediately followed by one of three tokens `"`, `'` or `#`, which is stricter than the requirements of RFC 3101 but may be necessary according to the discussion at [Zulip].

[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/268952-edition-2021/topic/reserved.20prefixes/near/238470099

The tracking issue #84599 says we'll add a feature gate named `reserved_prefixes`, but I don't think I can do this because it is impossible for the lexer to know whether a feature is enabled or not. I guess determining the behavior by the edition information should be enough.

Fixes #84599


Trivial merge