|
@@ -14,9 +14,7 @@ impl DatumList for () {
|
|
fn list_head(&self) -> &Self::ListHead {
|
|
fn list_head(&self) -> &Self::ListHead {
|
|
unreachable!()
|
|
unreachable!()
|
|
}
|
|
}
|
|
- fn list_tail(&self) -> Self::ListTail {
|
|
|
|
- ()
|
|
|
|
- }
|
|
|
|
|
|
+ fn list_tail(&self) -> Self::ListTail { }
|
|
|
|
|
|
fn accept(&self, _: &mut impl DatumVisitor) {}
|
|
fn accept(&self, _: &mut impl DatumVisitor) {}
|
|
}
|
|
}
|
|
@@ -38,9 +36,7 @@ impl<T: Datum> DatumList for T {
|
|
fn list_head(&self) -> &Self::ListHead {
|
|
fn list_head(&self) -> &Self::ListHead {
|
|
self
|
|
self
|
|
}
|
|
}
|
|
- fn list_tail(&self) -> Self::ListTail {
|
|
|
|
- ()
|
|
|
|
- }
|
|
|
|
|
|
+ fn list_tail(&self) -> Self::ListTail { }
|
|
|
|
|
|
fn accept(&self, visitor: &mut impl DatumVisitor) {
|
|
fn accept(&self, visitor: &mut impl DatumVisitor) {
|
|
visitor.visit(self);
|
|
visitor.visit(self);
|
|
@@ -65,9 +61,7 @@ impl<T0: Datum> DatumList for (T0,) {
|
|
fn list_head(&self) -> &Self::ListHead {
|
|
fn list_head(&self) -> &Self::ListHead {
|
|
&self.0
|
|
&self.0
|
|
}
|
|
}
|
|
- fn list_tail(&self) -> Self::ListTail {
|
|
|
|
- ()
|
|
|
|
- }
|
|
|
|
|
|
+ fn list_tail(&self) -> Self::ListTail { }
|
|
|
|
|
|
fn accept(&self, visitor: &mut impl DatumVisitor) {
|
|
fn accept(&self, visitor: &mut impl DatumVisitor) {
|
|
visitor.visit(&self.0);
|
|
visitor.visit(&self.0);
|
|
@@ -106,9 +100,9 @@ macro_rules! datum_list {
|
|
|
|
|
|
impl<$ty0: ConcreteDatum, $( $ty: ConcreteDatum ),*> ConcreteDatumList for ($ty0, $($ty),*) {
|
|
impl<$ty0: ConcreteDatum, $( $ty: ConcreteDatum ),*> ConcreteDatumList for ($ty0, $($ty),*) {
|
|
fn build_equivalent<'l>(mut from: impl Iterator<Item = &'l str>) -> Option<impl QueryEquivalentList<Self> + 'l> {
|
|
fn build_equivalent<'l>(mut from: impl Iterator<Item = &'l str>) -> Option<impl QueryEquivalentList<Self> + 'l> {
|
|
|
|
+ #[allow(clippy::eq_op)]
|
|
Some((
|
|
Some((
|
|
StringQuery( from.next()? ),
|
|
StringQuery( from.next()? ),
|
|
- #[allow(clippy::eq_op)]
|
|
|
|
$( if $n == $n { StringQuery( from.next()? ) } else { panic!() } ),*
|
|
$( if $n == $n { StringQuery( from.next()? ) } else { panic!() } ),*
|
|
))
|
|
))
|
|
}
|
|
}
|