summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poveda <christian.poveda@ferrous-systems.com>2022-08-16 11:36:40 -0500
committerEmilio Cobos Álvarez <emilio@crisal.io>2022-08-18 18:08:37 +0200
commit89269026daae91c29aa555ffd3fe978741f88032 (patch)
treecc51326e8dfacaeba788767954f3703aecc4d7fe /src
parentbc19e553da2e5c89470f413b1e07e4c9a5647b58 (diff)
emit warnings later
Diffstat (limited to 'src')
-rw-r--r--src/ir/context.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/ir/context.rs b/src/ir/context.rs
index 61fa8439..a91d5224 100644
--- a/src/ir/context.rs
+++ b/src/ir/context.rs
@@ -2440,24 +2440,21 @@ If you encounter an error missing from this list, please file an issue or a PR!"
let mut warnings = Vec::new();
for item in self.options().allowlisted_functions.unmatched_items() {
- let warn = format!("unused option: --allowlist-function {}", item);
- warn!("{}", warn);
- warnings.push(warn);
+ warnings.push(format!("unused option: --allowlist-function {}", item));
}
for item in self.options().allowlisted_vars.unmatched_items() {
- let warn = format!("unused option: --allowlist-var {}", item);
- warn!("{}", warn);
- warnings.push(warn);
+ warnings.push(format!("unused option: --allowlist-var {}", item));
}
for item in self.options().allowlisted_types.unmatched_items() {
- let warn = format!("unused option: --allowlist-type {}", item);
- warn!("{}", warn);
- warnings.push(warn);
+ warnings.push(format!("unused option: --allowlist-type {}", item));
}
- self.warnings.extend(warnings);
+ for msg in warnings {
+ warn!("{}", msg);
+ self.warnings.push(msg);
+ }
}
/// Convenient method for getting the prefix to use for most traits in