1use core::cmp::Ordering;
2
3#[cfg_attr(docsrs, doc(cfg(feature = "span-locations")))]
7#[derive(#[automatically_derived]
impl ::core::marker::Copy for LineColumn { }Copy, #[automatically_derived]
impl ::core::clone::Clone for LineColumn {
#[inline]
fn clone(&self) -> LineColumn {
let _: ::core::clone::AssertParamIsClone<usize>;
*self
}
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for LineColumn {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "LineColumn",
"line", &self.line, "column", &&self.column)
}
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for LineColumn {
#[inline]
fn eq(&self, other: &LineColumn) -> bool {
self.line == other.line && self.column == other.column
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for LineColumn {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) -> () {
let _: ::core::cmp::AssertParamIsEq<usize>;
}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for LineColumn {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
::core::hash::Hash::hash(&self.line, state);
::core::hash::Hash::hash(&self.column, state)
}
}Hash)]
8pub struct LineColumn {
9 pub line: usize,
12 pub column: usize,
15}
16
17impl Ord for LineColumn {
18 fn cmp(&self, other: &Self) -> Ordering {
19 self.line
20 .cmp(&other.line)
21 .then(self.column.cmp(&other.column))
22 }
23}
24
25impl PartialOrd for LineColumn {
26 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
27 Some(self.cmp(other))
28 }
29}