diff options
| author | bors <bors@rust-lang.org> | 2019-04-11 23:36:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-04-11 23:36:13 +0000 |
| commit | cd8b4373623c5a0f05559f67be217c48bfb8bcab (patch) | |
| tree | 397b0ddc692ed7f02e71b76193e5d24781c30cb0 /src/libsyntax_ext | |
| parent | 3de0106789468b211bcc3a25c09c0cf07119186d (diff) | |
| parent | 5ea959dc8bfdf0dd62fd8ac611ba4e9e8d75c69d (diff) | |
| download | rust-cd8b4373623c5a0f05559f67be217c48bfb8bcab.tar.gz rust-cd8b4373623c5a0f05559f67be217c48bfb8bcab.zip | |
Auto merge of #59227 - Zoxc:fix-get, r=eddyb
Fix lifetime on LocalInternedString::get function cc @eddyb @nnethercote
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 } |
