Skip to content

Commit

Permalink
Auto merge of #98840 - cjgillot:span-inline-ctxt, r=wesleywiser
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Sep 22, 2022
2 parents f315956 + 914d880 commit 6146cc5
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 6146cc5

Please sign in to comment.