diff --git a/lang/miette_util/src/codespan.rs b/lang/miette_util/src/codespan.rs index 9b1fe20aa6..68c883aa6b 100644 --- a/lang/miette_util/src/codespan.rs +++ b/lang/miette_util/src/codespan.rs @@ -1,5 +1,5 @@ use std::fmt; -use std::ops::{Add, AddAssign, Neg, Sub, SubAssign}; +use std::ops::{Add, Sub}; /// A byte position in a source file. #[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] @@ -252,31 +252,3 @@ impl Location { Location { line: line.into(), column: column.into() } } } - -/// A relative offset between two indices -/// -/// These can be thought of as 1-dimensional vectors -pub trait Offset: Copy + Ord -where - Self: Neg, - Self: Add, - Self: AddAssign, - Self: Sub, - Self: SubAssign, -{ - const ZERO: Self; -} - -/// Index types -/// -/// These can be thought of as 1-dimensional points -pub trait Index: Copy + Ord -where - Self: Add<::Offset, Output = Self>, - Self: AddAssign<::Offset>, - Self: Sub<::Offset, Output = Self>, - Self: SubAssign<::Offset>, - Self: Sub::Offset>, -{ - type Offset: Offset; -}