summaryrefslogtreecommitdiff
path: root/src/syntax/span.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/span.rs')
-rw-r--r--src/syntax/span.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/syntax/span.rs b/src/syntax/span.rs
index 89f773c7..9357c345 100644
--- a/src/syntax/span.rs
+++ b/src/syntax/span.rs
@@ -14,12 +14,6 @@ thread_local! {
static CMP_SPANS: Cell<bool> = Cell::new(true);
}
-/// When set to `false` comparisons with `PartialEq` ignore spans.
-#[cfg(test)]
-pub(crate) fn set_cmp(cmp: bool) {
- CMP_SPANS.with(|cell| cell.set(cmp));
-}
-
/// Span offsetting.
pub trait Offset {
/// Offset all spans contained in `Self` by the given position.
@@ -132,6 +126,12 @@ impl Span {
pub fn expand(&mut self, other: Self) {
*self = Self::merge(*self, other)
}
+
+ /// When set to `false` comparisons with `PartialEq` ignore spans.
+ #[cfg(test)]
+ pub(crate) fn set_cmp(cmp: bool) {
+ CMP_SPANS.with(|cell| cell.set(cmp));
+ }
}
impl Offset for Span {