Commits

Stepan Koltsov committed a86db0f

Rust: properly highlight lifetime specifiers

Like in this snippet:

```
fn foo<'a, 'bbb>(a: &'a int, bb: &'bbb int) -> char {
'x'
}
```

  • Participants
  • Parent commits 7304e47

Comments (0)

Files changed (1)

pygments/lexers/compiled.py

             (r"""'(\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}"""
              r"""|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|.)'""",
              String.Char),
+            # Lifetime
+            (r"""'[a-zA-Z_][a-zA-Z0-9_]*""", Name.Label),
             # Binary Literal
             (r'0[Bb][01_]+', Number, 'number_lit'),
             # Octal Literal