diff options
author | Aspen Smith <root@gws.fyi> | 2024-07-04T17·42-0400 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-07-05T03·53+0000 |
commit | 6037888e18bf34e8381acfd7fa6c0bed3049e14d (patch) | |
tree | 3b2956cf9b0b991fcf54ddc1153d2e87d2d0b502 /tvix/eval/src/spans.rs | |
parent | 8e31088a019c2c118e40323b1c7f9471805317c6 (diff) |
refactor(tvix/eval): Drop LightSpan entirely r/8343
This was made unnecessary in c92d06271 (feat(tvix/eval): drop LightSpan::Delayed, 2023-12-08) because it didn't improve benchmarks as much as expected and has been vestigial since; this continues the cleanup by just removing it altogether Change-Id: I21ec7ae9b52a5cccd2092696a5a87f658194d672 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11949 Autosubmit: aspen <root@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/eval/src/spans.rs')
-rw-r--r-- | tvix/eval/src/spans.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tvix/eval/src/spans.rs b/tvix/eval/src/spans.rs index f422093b0d12..9998e438b220 100644 --- a/tvix/eval/src/spans.rs +++ b/tvix/eval/src/spans.rs @@ -5,37 +5,6 @@ use codemap::{File, Span}; use rnix::ast; use rowan::ast::AstNode; -/// Helper struct to carry information required for making a span, but -/// without actually performing the (expensive) span lookup. -/// -/// This is used for tracking spans across thunk boundaries, as they -/// are frequently instantiated but spans are only used in error or -/// warning cases. -#[derive(Clone, Debug)] -pub enum LightSpan { - /// The span has already been computed and can just be used right - /// away. - Actual { span: Span }, -} - -impl LightSpan { - pub fn new_actual(span: Span) -> Self { - Self::Actual { span } - } - - pub fn span(&self) -> Span { - match self { - LightSpan::Actual { span } => *span, - } - } -} - -impl From<Span> for LightSpan { - fn from(span: Span) -> Self { - LightSpan::Actual { span } - } -} - /// Trait implemented by all types from which we can retrieve a span. pub trait ToSpan { fn span_for(&self, file: &File) -> Span; |