mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Add a comment on TokenKind::Interpolated
.
This commit is contained in:
parent
99f5945f85
commit
baa18c027a
@ -237,6 +237,15 @@ pub enum TokenKind {
|
||||
/// treat regular and interpolated lifetime identifiers in the same way.
|
||||
Lifetime(Symbol),
|
||||
|
||||
/// An embedded AST node, as produced by a macro. This only exists for
|
||||
/// historical reasons. We'd like to get rid of it, for multiple reasons.
|
||||
/// - It's conceptually very strange. Saying a token can contain an AST
|
||||
/// node is like saying, in natural language, that a word can contain a
|
||||
/// sentence.
|
||||
/// - It requires special handling in a bunch of places in the parser.
|
||||
/// - It prevents `Token` from implementing `Copy`.
|
||||
/// It adds complexity and likely slows things down. Please don't add new
|
||||
/// occurrences of this token kind!
|
||||
Interpolated(Lrc<Nonterminal>),
|
||||
|
||||
/// A doc comment token.
|
||||
|
Loading…
Reference in New Issue
Block a user