Skip to content

Commit cc6dcaa

Browse files
committed
Use Level::from_symbol in unnecessary_clippy_cfg
1 parent 6591dc6 commit cc6dcaa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clippy_lints/src/attrs.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,9 +1000,7 @@ fn check_clippy_cfg_attr(
10001000
) {
10011001
if cfg_attr.has_name(sym::clippy)
10021002
&& let Some(ident) = behind_cfg_attr.ident()
1003-
// FIXME: replace with `from_symbol` once https://github.com/rust-lang/rust/pull/121230
1004-
// is merged.
1005-
&& Level::from_str(ident.name.as_str()).is_some()
1003+
&& Level::from_symbol(ident.name, Some(attr.id)).is_some()
10061004
&& let Some(items) = behind_cfg_attr.meta_item_list()
10071005
{
10081006
let nb_items = items.len();

0 commit comments

Comments
 (0)