diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-06-25 20:43:04 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-07-17 19:41:02 +0200 |
| commit | 078dd37f882a59d4277d80b829d729bfd2b5a5c2 (patch) | |
| tree | c37f60b600f91081c276d467c1e5839a7be39eee /compiler/rustc_span/src | |
| parent | 6e78d6c9d697217998322ab626cbeee24cdfe228 (diff) | |
| download | rust-078dd37f882a59d4277d80b829d729bfd2b5a5c2.tar.gz rust-078dd37f882a59d4277d80b829d729bfd2b5a5c2.zip | |
Use LocalExpnId where possible.
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/hygiene.rs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs index 14b68112982..138ec061423 100644 --- a/compiler/rustc_span/src/hygiene.rs +++ b/compiler/rustc_span/src/hygiene.rs @@ -198,19 +198,6 @@ impl ExpnId { ExpnId { krate: LOCAL_CRATE, local_id: ExpnIndex::from_u32(0) } } - pub fn fresh_empty() -> ExpnId { - LocalExpnId::fresh_empty().to_expn_id() - } - - pub fn fresh(expn_data: ExpnData, ctx: impl HashStableContext) -> ExpnId { - LocalExpnId::fresh(expn_data, ctx).to_expn_id() - } - - #[inline] - pub fn set_expn_data(self, expn_data: ExpnData, ctx: impl HashStableContext) { - self.expect_local().set_expn_data(expn_data, ctx) - } - #[inline] pub fn expn_hash(self) -> ExpnHash { HygieneData::with(|data| data.expn_hash(self)) @@ -819,7 +806,7 @@ impl Span { transparency: Transparency, ctx: impl HashStableContext, ) -> Span { - let expn_id = ExpnId::fresh(expn_data, ctx); + let expn_id = LocalExpnId::fresh(expn_data, ctx).to_expn_id(); HygieneData::with(|data| { self.with_ctxt(data.apply_mark(SyntaxContext::root(), expn_id, transparency)) }) |
