fix(REPL): suppress unused vars warn in REPL

This commit is contained in:
Shunsuke Shibayama 2023-02-08 00:12:52 +09:00
parent 89d830c364
commit 06b4df6568
3 changed files with 31 additions and 26 deletions

View file

@ -2142,13 +2142,8 @@ impl ASTLowerer {
return Err(self.return_incomplete_artifact(hir));
}
};
// TODO: recursive check
for chunk in hir.module.iter() {
if let Err(warns) = self.use_check(chunk, mode) {
self.warns.extend(warns);
}
}
self.warn_unused_vars();
self.warn_unused_expr(&hir.module, mode);
self.warn_unused_vars(mode);
if self.errs.is_empty() {
log!(info "the AST lowering process has completed.");
Ok(CompleteArtifact::new(