diff options
author | Nadrieril | 2019-08-13 19:31:23 +0200 |
---|---|---|
committer | Nadrieril | 2019-08-13 19:31:23 +0200 |
commit | 5895c3aa6552f75d7e5202be561f9734fe8945e7 (patch) | |
tree | 80c4258ce94e82af29bf6a09f483c38601a16b34 /dhall_syntax/src/printer.rs | |
parent | cbd62bb57bcc94e0133c57437488a5af22a0b1c2 (diff) |
No need to track the absence of `Span`s at the type level
Diffstat (limited to '')
-rw-r--r-- | dhall_syntax/src/printer.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dhall_syntax/src/printer.rs b/dhall_syntax/src/printer.rs index 70b224e..95eafe5 100644 --- a/dhall_syntax/src/printer.rs +++ b/dhall_syntax/src/printer.rs @@ -111,21 +111,21 @@ enum PrintPhase { // Wraps an Expr with a phase, so that phase selsction can be done // separate from the actual printing #[derive(Clone)] -struct PhasedExpr<'a, S, A>(&'a SubExpr<S, A>, PrintPhase); +struct PhasedExpr<'a, A>(&'a SubExpr<A>, PrintPhase); -impl<'a, S: Clone, A: Display + Clone> Display for PhasedExpr<'a, S, A> { +impl<'a, A: Display + Clone> Display for PhasedExpr<'a, A> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { self.0.as_ref().fmt_phase(f, self.1) } } -impl<'a, S: Clone, A: Display + Clone> PhasedExpr<'a, S, A> { - fn phase(self, phase: PrintPhase) -> PhasedExpr<'a, S, A> { +impl<'a, A: Display + Clone> PhasedExpr<'a, A> { + fn phase(self, phase: PrintPhase) -> PhasedExpr<'a, A> { PhasedExpr(self.0, phase) } } -impl<S: Clone, A: Display + Clone> Expr<S, A> { +impl<A: Display + Clone> Expr<A> { fn fmt_phase( &self, f: &mut fmt::Formatter, @@ -196,7 +196,7 @@ impl<S: Clone, A: Display + Clone> Expr<S, A> { } } -impl<S: Clone, A: Display + Clone> Display for SubExpr<S, A> { +impl<A: Display + Clone> Display for SubExpr<A> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { self.as_ref().fmt_phase(f, PrintPhase::Base) } |