mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: Improve rooted upmapping
This commit is contained in:
parent
03d2d9016d
commit
9ba4493918
24 changed files with 231 additions and 153 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue