diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-18 05:16:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-18 05:16:29 +0200 |
| commit | 540fb228af41bbc937adc15d98cd72fabaff95c2 (patch) | |
| tree | 494fc5f17f9fe68015d160e647a7ca7e20033d8d /compiler/rustc_lint_defs/src/lib.rs | |
| parent | 5e8bc7f4d35bf71142c2913721143bc3856efecc (diff) | |
| parent | 846c10fecfdbda6e43073af226486ff7ec3f873d (diff) | |
| download | rust-540fb228af41bbc937adc15d98cd72fabaff95c2.tar.gz rust-540fb228af41bbc937adc15d98cd72fabaff95c2.zip | |
Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann
Remove `name_or_empty` Another step towards #137978. r? ``@jdonszelmann``
Diffstat (limited to 'compiler/rustc_lint_defs/src/lib.rs')
| -rw-r--r-- | compiler/rustc_lint_defs/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint_defs/src/lib.rs b/compiler/rustc_lint_defs/src/lib.rs index 7fdbae3a59d..b4069b317bf 100644 --- a/compiler/rustc_lint_defs/src/lib.rs +++ b/compiler/rustc_lint_defs/src/lib.rs @@ -249,7 +249,7 @@ impl Level { /// Converts an `Attribute` to a level. pub fn from_attr(attr: &impl AttributeExt) -> Option<(Self, Option<LintExpectationId>)> { - Self::from_symbol(attr.name_or_empty(), || Some(attr.id())) + attr.name().and_then(|name| Self::from_symbol(name, || Some(attr.id()))) } /// Converts a `Symbol` to a level. |
