Remove unnecessary sigils around Symbol::as_str() calls.

This commit is contained in:
Nicholas Nethercote 2021-12-15 14:39:23 +11:00
parent 8cddcd39ba
commit 056d48a2c9
104 changed files with 189 additions and 192 deletions

View file

@ -331,9 +331,9 @@ pub struct Ident {
impl Ident {
fn new(sess: &ParseSess, sym: Symbol, is_raw: bool, span: Span) -> Ident {
let sym = nfc_normalize(&sym.as_str());
let sym = nfc_normalize(sym.as_str());
let string = sym.as_str();
if !rustc_lexer::is_ident(&string) {
if !rustc_lexer::is_ident(string) {
panic!("`{:?}` is not a valid identifier", string)
}
if is_raw && !sym.can_be_raw() {