summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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