hygiene: Make sure transparency of Mark::root() is an implementation detail and cannot be inspected outside of hygiene.rs

This commit is contained in:
Vadim Petrochenkov 2018-06-23 20:42:25 +03:00
parent c00f5af4d6
commit 117cb040f1

View File

@ -126,11 +126,13 @@ impl Mark {
#[inline]
pub fn transparency(self) -> Transparency {
assert_ne!(self, Mark::root());
HygieneData::with(|data| data.marks[self.0 as usize].transparency)
}
#[inline]
pub fn set_transparency(self, transparency: Transparency) {
assert_ne!(self, Mark::root());
HygieneData::with(|data| data.marks[self.0 as usize].transparency = transparency)
}