internal: Improve rooted upmapping

This commit is contained in:
Lukas Wirth 2024-03-12 13:24:52 +01:00
parent 03d2d9016d
commit 9ba4493918
24 changed files with 231 additions and 153 deletions

View file

@ -56,6 +56,12 @@ pub struct SpanData<Ctx> {
pub ctx: Ctx,
}
impl<Ctx: Copy> SpanData<Ctx> {
pub fn eq_ignoring_ctx(self, other: Self) -> bool {
self.anchor == other.anchor && self.range == other.range
}
}
impl Span {
#[deprecated = "dummy spans will panic if surfaced incorrectly, as such they should be replaced appropriately"]
pub const DUMMY: Self = SpanData {