zkat/miette#347 landed on Feb 21.
Maybe this comment can be addressed now?
|
pub fn span(&self) -> SourceSpan { |
|
let mut span = self.0.span(); |
|
if span.end == self.0.source().len() { |
|
// Currently miette silently fails to display a label |
|
// if the span is at the end of the source; this means |
|
// we can't properly show the "end of input" span. |
|
// For now, have the span point at the last byte in the source. |
|
// See: https://github.com/zkat/miette/issues/219 |
|
span.start -= 1; |
|
span.end = span.start + 1; |
|
} |
|
|
|
to_source_span(span) |
|
} |
zkat/miette#347 landed on Feb 21.
Maybe this comment can be addressed now?
wac/crates/wac-parser/src/lexer.rs
Lines 466 to 479 in d3f6be2