Skip to content

Commit c309065

Browse files
committed
Remove is_empty check in Ident::is_numeric.
`Ident`s can no longer be empty, so the test always succeeds.
1 parent 85d2d84 commit c309065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2823,7 +2823,7 @@ impl Ident {
28232823
/// Whether this would be the identifier for a tuple field like `self.0`, as
28242824
/// opposed to a named field like `self.thing`.
28252825
pub fn is_numeric(self) -> bool {
2826-
!self.name.is_empty() && self.as_str().bytes().all(|b| b.is_ascii_digit())
2826+
self.as_str().bytes().all(|b| b.is_ascii_digit())
28272827
}
28282828
}
28292829

0 commit comments

Comments
 (0)