From 1c15d7849c311dd73ab9bb96cd2a91d31cd81e42 Mon Sep 17 00:00:00 2001 From: David Mak Date: Thu, 9 Nov 2023 15:20:29 +0800 Subject: [PATCH] core: Emit dead code warning via stderr --- nac3core/src/typecheck/function_check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nac3core/src/typecheck/function_check.rs b/nac3core/src/typecheck/function_check.rs index 7ed0735..f1e7280 100644 --- a/nac3core/src/typecheck/function_check.rs +++ b/nac3core/src/typecheck/function_check.rs @@ -312,7 +312,7 @@ impl<'a> Inferencer<'a> { let mut ret = false; for stmt in block { if ret { - println!("warning: dead code at {:?}\n", stmt.location) + eprintln!("warning: dead code at {:?}\n", stmt.location) } if self.check_stmt(stmt, defined_identifiers)? { ret = true;