From 1963c30744be380d702716dfde9c21ca1a01275e Mon Sep 17 00:00:00 2001 From: David Mak Date: Tue, 6 Feb 2024 18:11:51 +0800 Subject: [PATCH] core: Use Display output for locations --- nac3core/src/typecheck/function_check.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nac3core/src/typecheck/function_check.rs b/nac3core/src/typecheck/function_check.rs index 25131bc2..e407880d 100644 --- a/nac3core/src/typecheck/function_check.rs +++ b/nac3core/src/typecheck/function_check.rs @@ -337,7 +337,7 @@ impl<'a> Inferencer<'a> { if !self.check_return_value_ty(ret_ty) { return Err(HashSet::from([ format!( - "return value of type {} must be a primitive of a tuple of primitives at {:?}", + "return value of type {} must be a primitive of a tuple of primitives at {}", self.unifier.stringify(ret_ty), value.location, ), @@ -366,7 +366,7 @@ impl<'a> Inferencer<'a> { let mut ret = false; for stmt in block { if ret { - eprintln!("warning: dead code at {:?}\n", stmt.location); + eprintln!("warning: dead code at {}\n", stmt.location); } if self.check_stmt(stmt, defined_identifiers)? { ret = true;