From f284cbc7af06a941de0cdd06291dc78d37268b9f Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 24 Sep 2015 23:05:02 +0300 Subject: Cleanup interfaces of Name, SyntaxContext and Ident Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined --- src/libsyntax/diagnostics/plugin.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/diagnostics/plugin.rs') diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index 6c3bee3f48e..a276765e216 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -138,7 +138,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, )); } }); - let sym = Ident::new(token::gensym(&format!( + let sym = Ident::with_empty_ctxt(token::gensym(&format!( "__register_diagnostic_{}", code ))); MacEager::items(SmallVector::many(vec![ -- cgit 1.4.1-3-g733a5