From 3558d41cea889b4c91a8d2c40a87746fdfcd5e01 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Wed, 4 Dec 2019 15:46:05 -0800 Subject: [PATCH] Fix wast error line numbers; previously off by one (#666) --- crates/wast/src/wast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wast/src/wast.rs b/crates/wast/src/wast.rs index 2ec0e63d93..d2d5305148 100644 --- a/crates/wast/src/wast.rs +++ b/crates/wast/src/wast.rs @@ -152,7 +152,7 @@ impl WastContext { }; let context = |sp: wast::Span| { let (line, col) = sp.linecol_in(wast); - format!("for directive on {}:{}:{}", filename, line, col) + format!("for directive on {}:{}:{}", filename, line + 1, col) }; let buf = wast::parser::ParseBuffer::new(wast).map_err(adjust_wast)?;