Skip to content

Commit

Permalink
emit warnings later
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz authored and Aatif Syed committed Sep 22, 2022
1 parent 09069f8 commit b9a1dbc
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/ir/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b9a1dbc

Please sign in to comment.