Rollup merge of #89672 - klensy:unwrap-or-macro, r=jackh726
Remove unwrap_or! macro Removes `unwrap_or!` macro and replaces it with `match`. It's kinda cleanup, as rustc_ast not the best place for this macro and this is used only in 2 places anyway.
This commit is contained in:
commit
cda07c740c
3 changed files with 8 additions and 17 deletions
|
@ -1,7 +1,6 @@
|
|||
use crate::context::{CheckLintNameResult, LintStore};
|
||||
use crate::late::unerased_lint_store;
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::unwrap_or;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
|
||||
|
@ -233,7 +232,10 @@ impl<'s> LintLevelsBuilder<'s> {
|
|||
Some(lvl) => lvl,
|
||||
};
|
||||
|
||||
let mut metas = unwrap_or!(attr.meta_item_list(), continue);
|
||||
let mut metas = match attr.meta_item_list() {
|
||||
Some(x) => x,
|
||||
None => continue,
|
||||
};
|
||||
|
||||
if metas.is_empty() {
|
||||
// FIXME (#55112): issue unused-attributes lint for `#[level()]`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue