diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-22 16:04:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-22 16:04:13 +0200 |
| commit | 74b980d3a45a84adc5ceac192232356aa3502fc0 (patch) | |
| tree | 74d6a0f9295833f8f88ea8f1453413044f7a159c /compiler/rustc_span/src | |
| parent | 5cab70ed7fb444775a4ad7e965cd456592e3ffb7 (diff) | |
| parent | c309065ece12632a522676c794e0befbceb213f5 (diff) | |
Rollup merge of #141377 - nnethercote:rm-unnecessary-is_empty-checks, r=GuillaumeGomez
Remove unnecessary `is_empty` checks Part of #137978. r? `@GuillaumeGomez`
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index fbe3b4ca6f5..dc77eb52b2e 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -2823,7 +2823,7 @@ impl Ident { /// Whether this would be the identifier for a tuple field like `self.0`, as /// opposed to a named field like `self.thing`. pub fn is_numeric(self) -> bool { - !self.name.is_empty() && self.as_str().bytes().all(|b| b.is_ascii_digit()) + self.as_str().bytes().all(|b| b.is_ascii_digit()) } } |
