Move syntax::ext::hygiene to syntax_pos::hygiene.

This commit is contained in:
Jeffrey Seyfried 2017-03-16 10:23:33 +00:00
parent 07a34293fa
commit 1979f96549
8 changed files with 24 additions and 18 deletions

View file

@ -20,7 +20,7 @@ pub use util::ThinVec;
use syntax_pos::{mk_sp, BytePos, Span, DUMMY_SP, ExpnId};
use codemap::{respan, Spanned};
use abi::Abi;
use ext::hygiene::SyntaxContext;
use ext::hygiene::{Mark, SyntaxContext};
use print::pprust;
use ptr::P;
use rustc_data_structures::indexed_vec;
@ -256,6 +256,14 @@ impl NodeId {
pub fn as_u32(&self) -> u32 {
self.0
}
pub fn placeholder_from_mark(mark: Mark) -> Self {
NodeId(mark.as_u32())
}
pub fn placeholder_to_mark(self) -> Mark {
Mark::from_u32(self.0)
}
}
impl fmt::Display for NodeId {