Rollup merge of #89072 - bjorn3:less_symbol_as_str, r=michaelwoerister
Avoid a couple of Symbol::as_str calls in cg_llvm This should improve performance a tiny bit. Also remove `Symbol::len` and make `SymbolIndex` private.
This commit is contained in:
commit
8a454f8101
3 changed files with 11 additions and 12 deletions
|
@ -1618,7 +1618,7 @@ impl fmt::Display for MacroRulesNormalizedIdent {
|
|||
pub struct Symbol(SymbolIndex);
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
pub struct SymbolIndex { .. }
|
||||
struct SymbolIndex { .. }
|
||||
}
|
||||
|
||||
impl Symbol {
|
||||
|
@ -1644,10 +1644,6 @@ impl Symbol {
|
|||
self.0.as_u32()
|
||||
}
|
||||
|
||||
pub fn len(self) -> usize {
|
||||
with_session_globals(|session_globals| session_globals.symbol_interner.get(self).len())
|
||||
}
|
||||
|
||||
pub fn is_empty(self) -> bool {
|
||||
self == kw::Empty
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue