Skip to content

Commit 912364a

Browse files
committed
Remove From trait impl for ExternalSyntaxContext, privatize
`is_root`
1 parent aa70226 commit 912364a

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎compiler/rustc_span/src/hygiene.rs‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,18 +1484,11 @@ rustc_index::newtype_index! {
14841484

14851485
impl ExternalSyntaxContext {
14861486
#[inline(always)]
1487-
pub fn is_root(self) -> bool {
1487+
fn is_root(self) -> bool {
14881488
self.as_u32() == 0
14891489
}
14901490
}
14911491

1492-
impl From<SyntaxContext> for ExternalSyntaxContext {
1493-
#[inline]
1494-
fn from(ctxt: SyntaxContext) -> Self {
1495-
ExternalSyntaxContext::from_u32(ctxt.as_u32())
1496-
}
1497-
}
1498-
14991492
// Decodes `SyntaxContext`, using the provided `HygieneDecodeContext`
15001493
// to track which `SyntaxContext`s we have already decoded.
15011494
// The provided closure will be invoked to deserialize a `SyntaxContextData`

0 commit comments

Comments
 (0)