diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-17 10:44:51 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-20 14:46:55 +1000 |
| commit | 88d29992bdd3d881b336b724675c59323e70e2e7 (patch) | |
| tree | b0f2bd78bad101b6d3dd332ffbc0a2ceb9daa972 /src/libsyntax/diagnostics/plugin.rs | |
| parent | e57c0dbeb72cf631930429a20badd41290bb0608 (diff) | |
| download | rust-88d29992bdd3d881b336b724675c59323e70e2e7.tar.gz rust-88d29992bdd3d881b336b724675c59323e70e2e7.zip | |
Remove `Symbol::gensym()`.
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![], ) |
