Support negative numbers in Literal::from_str

This commit is contained in:
David Tolnay 2021-07-08 20:24:29 -07:00
parent 331da5820c
commit 55ff45a5c2
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
3 changed files with 57 additions and 23 deletions

View file

@ -1588,6 +1588,10 @@ impl Symbol {
self.0.as_u32()
}
pub fn len(self) -> usize {
with_interner(|interner| interner.get(self).len())
}
pub fn is_empty(self) -> bool {
self == kw::Empty
}