forked from M-Labs/nac3
1
0
Fork 0

core: Use Display output for locations

This commit is contained in:
David Mak 2024-02-06 18:11:51 +08:00
parent 27011f385b
commit 1963c30744
1 changed files with 2 additions and 2 deletions

View File

@ -337,7 +337,7 @@ impl<'a> Inferencer<'a> {
if !self.check_return_value_ty(ret_ty) { if !self.check_return_value_ty(ret_ty) {
return Err(HashSet::from([ return Err(HashSet::from([
format!( 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), self.unifier.stringify(ret_ty),
value.location, value.location,
), ),
@ -366,7 +366,7 @@ impl<'a> Inferencer<'a> {
let mut ret = false; let mut ret = false;
for stmt in block { for stmt in block {
if ret { 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)? { if self.check_stmt(stmt, defined_identifiers)? {
ret = true; ret = true;