mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 05:13:35 +00:00
chore: Remove legacy SyntaxContextId re-export
This commit is contained in:
parent
60cd01864a
commit
02a793bd59
38 changed files with 164 additions and 228 deletions
|
|
@ -37,13 +37,13 @@ pub use self::body::{Body, BodySourceMap};
|
|||
|
||||
/// A wrapper around [`span::SyntaxContextId`] that is intended only for comparisons.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct HygieneId(span::SyntaxContextId);
|
||||
pub struct HygieneId(span::SyntaxContext);
|
||||
|
||||
impl HygieneId {
|
||||
// The edition doesn't matter here, we only use this for comparisons and to lookup the macro.
|
||||
pub const ROOT: Self = Self(span::SyntaxContextId::root(Edition::Edition2015));
|
||||
pub const ROOT: Self = Self(span::SyntaxContext::root(Edition::Edition2015));
|
||||
|
||||
pub fn new(mut ctx: span::SyntaxContextId) -> Self {
|
||||
pub fn new(mut ctx: span::SyntaxContext) -> Self {
|
||||
// See `Name` for why we're doing that.
|
||||
ctx.remove_root_edition();
|
||||
Self(ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue