about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--corp/tvixbolt/src/main.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/corp/tvixbolt/src/main.rs b/corp/tvixbolt/src/main.rs
index c359eaed63..ee73fce71d 100644
--- a/corp/tvixbolt/src/main.rs
+++ b/corp/tvixbolt/src/main.rs
@@ -222,7 +222,7 @@ fn eval(trace: bool, code: &str) -> Output {
         .expect("expression should exist if no errors occured");
 
     let codemap = Rc::new(codemap);
-    let mut compilation_observer = DisassemblingObserver::new(codemap, &mut out.bytecode);
+    let mut compilation_observer = DisassemblingObserver::new(codemap.clone(), &mut out.bytecode);
 
     let result = tvix_eval::compile(
         root_expr,
@@ -236,10 +236,8 @@ fn eval(trace: bool, code: &str) -> Output {
     for warning in result.warnings {
         writeln!(
             &mut out.warnings,
-            "warning: {:?} at `{}` [line {}]",
-            warning.kind,
-            file.source_slice(warning.span),
-            file.find_line(warning.span.low()) + 1
+            "{}\n",
+            warning.fancy_format_str(&codemap).trim(),
         )
         .unwrap();
     }