Skip to content

Commit 8f84d9e

Browse files
committed
Inline and remove nfc_symbol_from method.
1 parent 7f9cc88 commit 8f84d9e

File tree

1 file changed

+1
-8
lines changed
  • src/librustc_parse/lexer

1 file changed

+1
-8
lines changed

src/librustc_parse/lexer/mod.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl<'a> StringReader<'a> {
220220
if is_raw_ident {
221221
ident_start = ident_start + BytePos(2);
222222
}
223-
let sym = self.nfc_symbol_from(ident_start);
223+
let sym = nfc_normalize(self.str_from(ident_start));
224224
if is_raw_ident {
225225
let span = self.mk_sp(start, self.pos);
226226
if !sym.can_be_raw() {
@@ -469,13 +469,6 @@ impl<'a> StringReader<'a> {
469469
Symbol::intern(self.str_from_to(start, end))
470470
}
471471

472-
/// As symbol_from, with the text normalized into Unicode NFC form.
473-
fn nfc_symbol_from(&self, start: BytePos) -> Symbol {
474-
debug!("taking an normalized ident from {:?} to {:?}", start, self.pos);
475-
let sym = self.str_from(start);
476-
nfc_normalize(sym)
477-
}
478-
479472
/// Slice of the source text spanning from `start` up to but excluding `end`.
480473
fn str_from_to(&self, start: BytePos, end: BytePos) -> &str {
481474
&self.src[self.src_index(start)..self.src_index(end)]

0 commit comments

Comments
 (0)