mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
e7119a0300
Inline SyntaxContext in both encoded span representation. The current interned representation for spans does not use the `ctxt_or_zero: u16` field. This PR proposes to use this field to store the `SyntaxContext` of the interned span instead. When `ctxt_or_zero` and the interned span's `ctxt` don't match, the inlined one takes precedence. This allows to implement `Span::ctxt` and `Span::with_ctxt` with much less probability to access the interner. Those functions are used a lot for hygiene, so this may be worth it. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |