Share native format and checkpoint source bytes

This commit is contained in:
gloamxun committed 2026-11-28 23:16:20 +08:00
1 parent 11c8ad1eaa
commit c09d545da6
7 files changed
+44 -23

No files matched your search

+2 -2
View File
@@ -718,12 +718,12 @@ pub struct ExecutionFailure {
impl Error {
fn at(
sources: &[SourceFile],
sources: &[impl std::borrow::Borrow<SourceFile>],
profile: InputProfile,
message: impl Into<String>,
span: Span,
) -> Self {
let source = sources.get(span.source);
let source = sources.get(span.source).map(std::borrow::Borrow::borrow);
let name = source.map_or("<input>", |s| s.name.as_str()).to_owned();
let prefix = source.map_or(&[][..], |s| &s.data[..span.start.min(s.data.len())]);
let (mut line, mut column, mut carriage_return) = (1, 1, false);