mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Auto merge of #17799 - Veykril:syntax-bridge, r=Veykril
Split out syntax-bridge into a separate crate This functionality is not really tied to mbe macros, so imo it has no place in that crate.
This commit is contained in:
commit
fbed308ebe
30 changed files with 268 additions and 140 deletions
|
@ -79,6 +79,10 @@ impl SyntaxContextId {
|
|||
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct SyntaxContextData {
|
||||
/// Invariant: Only [`SyntaxContextId::ROOT`] has a [`None`] outer expansion.
|
||||
// FIXME: The None case needs to encode the context crate id. We can encode that as the MSB of
|
||||
// MacroCallId is reserved anyways so we can do bit tagging here just fine.
|
||||
// The bigger issue is that that will cause interning to now create completely separate chains
|
||||
// per crate. Though that is likely not a problem as `MacroCallId`s are already crate calling dependent.
|
||||
pub outer_expn: Option<MacroCallId>,
|
||||
pub outer_transparency: Transparency,
|
||||
pub parent: SyntaxContextId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue