From f98053aa3c58f2e35279b906ab334a6ca6fb6ff6 Mon Sep 17 00:00:00 2001 From: rhysd Date: Sat, 29 Jan 2022 21:49:51 +0900 Subject: [PATCH] cli: Include file path in WGSL parse error --- cli/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 062ea6d7fa..76f950e487 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -281,7 +281,8 @@ fn run() -> Result<(), Box> { match result { Ok(v) => (v, Some(input)), Err(ref e) => { - e.emit_to_stderr(&input); + let path = input_path.to_string_lossy(); + e.emit_to_stderr_with_path(&input, &path); return Err(CliError("Could not parse WGSL").into()); } }