diff options
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/proc_macro_server.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax_ext/proc_macro_server.rs b/src/libsyntax_ext/proc_macro_server.rs index f902e8169b6..09dce775790 100644 --- a/src/libsyntax_ext/proc_macro_server.rs +++ b/src/libsyntax_ext/proc_macro_server.rs @@ -336,11 +336,11 @@ impl Ident { } } fn new(sym: Symbol, is_raw: bool, span: Span) -> Ident { - let string = sym.as_str().get(); - if !Self::is_valid(string) { + let string = sym.as_str(); + if !Self::is_valid(&string) { panic!("`{:?}` is not a valid identifier", string) } - if is_raw && !ast::Ident::from_str(string).can_be_raw() { + if is_raw && !ast::Ident::from_interned_str(sym.as_interned_str()).can_be_raw() { panic!("`{}` cannot be a raw identifier", string); } Ident { sym, is_raw, span } |
