diff options
| author | bors <bors@rust-lang.org> | 2019-05-21 06:37:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-05-21 06:37:03 +0000 |
| commit | 50a0defd5a93523067ef239936cc2e0755220904 (patch) | |
| tree | 34871483c741cd864f4d55a51d651b5fc1286f14 /src/libsyntax/diagnostics/plugin.rs | |
| parent | 46ad3e188287a3514de45ff89bac3cc451590d62 (diff) | |
| parent | 88d29992bdd3d881b336b724675c59323e70e2e7 (diff) | |
| download | rust-50a0defd5a93523067ef239936cc2e0755220904.tar.gz rust-50a0defd5a93523067ef239936cc2e0755220904.zip | |
Auto merge of #60903 - nnethercote:mv-gensyms-from-Symbol-to-Ident, r=petrochenkov
Move gensym operations from `Symbol` to `Ident` Gensyms are always at the `Ident` level, and long-term we probably want to record gensym-ness in hygiene data. r? @petrochenkov
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index 21024eb41ef..c988dc61bec 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -7,7 +7,7 @@ use crate::ext::base::{ExtCtxt, MacEager, MacResult}; use crate::ext::build::AstBuilder; use crate::parse::token; use crate::ptr::P; -use crate::symbol::{keywords, Symbol}; +use crate::symbol::keywords; use crate::tokenstream::{TokenTree}; use smallvec::smallvec; @@ -121,13 +121,13 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt<'_>, let span = span.apply_mark(ecx.current_expansion.mark); - let sym = Ident::new(Symbol::gensym(&format!("__register_diagnostic_{}", code)), span); + let name = Ident::from_str_and_span(&format!("__register_diagnostic_{}", code), span).gensym(); MacEager::items(smallvec![ ecx.item_mod( span, span, - sym, + name, vec![], vec![], ) |
