Fix wast error line numbers; previously off by one (#666)

This commit is contained in:
Andrew Brown
2019-12-04 15:46:05 -08:00
committed by Alex Crichton
parent 570bd7ec56
commit 3558d41cea

View File

@@ -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)?;