diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:10:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:10:01 +0200 |
| commit | 38157b0e0cbab22dc3f5fa5cc66d9b673a18a55b (patch) | |
| tree | 967dab30f04537b93126586dbb7f7b0d166290e4 /src/syntax/span.rs | |
| parent | e94627721db89c3b08aa17f54d59d19a09f7816f (diff) | |
Synchronous layout 🪀
Diffstat (limited to 'src/syntax/span.rs')
| -rw-r--r-- | src/syntax/span.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/syntax/span.rs b/src/syntax/span.rs index 5f51d157..0e9c15fe 100644 --- a/src/syntax/span.rs +++ b/src/syntax/span.rs @@ -41,7 +41,7 @@ impl<T> Offset for SpanVec<T> { /// A value with the span it corresponds to in the source code. #[derive(Default, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] -#[cfg_attr(feature = "serialize", derive(serde::Serialize))] +#[cfg_attr(feature = "serde", derive(serde::Serialize))] pub struct Spanned<T> { /// The spanned value. pub v: T, @@ -109,7 +109,7 @@ impl<T: Debug> Debug for Spanned<T> { /// Locates a slice of source code. #[derive(Copy, Clone, Ord, PartialOrd)] -#[cfg_attr(feature = "serialize", derive(serde::Serialize))] +#[cfg_attr(feature = "serde", derive(serde::Serialize))] pub struct Span { /// The inclusive start position. pub start: Pos, @@ -210,7 +210,7 @@ impl Debug for Span { /// A byte position in source code. #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] -#[cfg_attr(feature = "serialize", derive(serde::Serialize))] +#[cfg_attr(feature = "serde", derive(serde::Serialize))] pub struct Pos(pub u32); impl Pos { @@ -255,7 +255,7 @@ impl Debug for Pos { /// A one-indexed line-column position in source code. #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] -#[cfg_attr(feature = "serialize", derive(serde::Serialize))] +#[cfg_attr(feature = "serde", derive(serde::Serialize))] pub struct Location { /// The one-indexed line. pub line: u32, |
