diff --git a/crates/aiken-project/src/config.rs b/crates/aiken-project/src/config.rs index 56087fdf..1310145f 100644 --- a/crates/aiken-project/src/config.rs +++ b/crates/aiken-project/src/config.rs @@ -88,9 +88,9 @@ impl Config { src: raw_config.clone(), named: NamedSource::new(config_path.display().to_string(), raw_config).into(), // this isn't actually a legit way to get the span - location: e.line_col().map(|(line, col)| Span { - start: line, - end: col, + location: e.span().map(|range| Span { + start: range.start, + end: range.end, }), help: e.to_string(), })?; diff --git a/crates/aiken-project/src/deps.rs b/crates/aiken-project/src/deps.rs index 0ba25844..aa561f1a 100644 --- a/crates/aiken-project/src/deps.rs +++ b/crates/aiken-project/src/deps.rs @@ -48,9 +48,9 @@ impl LocalPackages { src: src.clone(), named: NamedSource::new(path.display().to_string(), src).into(), // this isn't actually a legit way to get the span - location: e.line_col().map(|(line, col)| Span { - start: line, - end: col, + location: e.span().map(|range| Span { + start: range.start, + end: range.end, }), help: e.to_string(), })?; diff --git a/crates/aiken-project/src/deps/manifest.rs b/crates/aiken-project/src/deps/manifest.rs index ef423894..57374310 100644 --- a/crates/aiken-project/src/deps/manifest.rs +++ b/crates/aiken-project/src/deps/manifest.rs @@ -54,9 +54,9 @@ impl Manifest { src: toml.clone(), named: NamedSource::new(manifest_path.display().to_string(), toml).into(), // this isn't actually a legit way to get the span - location: e.line_col().map(|(line, col)| Span { - start: line, - end: col, + location: e.span().map(|range| Span { + start: range.start, + end: range.end, }), help: e.to_string(), })?;