Rust lifetimes token specification


#1

Where is the lexical specification for the lifetimes token ? I couldn’t find it here: http://doc.rust-lang.org/grammar.html#lexical-structure
Is there other lexical structures I should know about, that aren’t mentioned in the spec?


#2

The definition of the lifetime token seems to be missing from the grammar spec and the reference (have you seen the latter?). You should probably open an issue for that to be added.

There is the grammar file in the repo, though, that specifies it:

LIFETIME : '\'' IDENT ;

Big surprise! It’s a single quote and an identifier! :smile:


#3