@@ -11,7 +11,7 @@ use std::mem;
1111use std:: path:: PathBuf ;
1212use syntax:: ast;
1313use syntax:: span_err;
14- use syntax:: symbol:: sym;
14+ use syntax:: symbol:: { Symbol , keywords , sym} ;
1515use syntax_pos:: { Span , DUMMY_SP } ;
1616
1717/// Pointer to a registrar function.
@@ -58,9 +58,9 @@ pub fn load_plugins(sess: &Session,
5858 for plugin in plugins {
5959 // plugins must have a name and can't be key = value
6060 let name = plugin. name_or_empty ( ) ;
61- if ! name. is_empty ( ) && !plugin. is_value_str ( ) {
61+ if name != keywords :: Invalid . name ( ) && !plugin. is_value_str ( ) {
6262 let args = plugin. meta_item_list ( ) . map ( ToOwned :: to_owned) ;
63- loader. load_plugin ( plugin. span ( ) , & name, args. unwrap_or_default ( ) ) ;
63+ loader. load_plugin ( plugin. span ( ) , name, args. unwrap_or_default ( ) ) ;
6464 } else {
6565 call_malformed_plugin_attribute ( sess, attr. span ) ;
6666 }
@@ -70,7 +70,7 @@ pub fn load_plugins(sess: &Session,
7070
7171 if let Some ( plugins) = addl_plugins {
7272 for plugin in plugins {
73- loader. load_plugin ( DUMMY_SP , & plugin, vec ! [ ] ) ;
73+ loader. load_plugin ( DUMMY_SP , Symbol :: intern ( & plugin) , vec ! [ ] ) ;
7474 }
7575 }
7676
@@ -86,7 +86,7 @@ impl<'a> PluginLoader<'a> {
8686 }
8787 }
8888
89- fn load_plugin ( & mut self , span : Span , name : & str , args : Vec < ast:: NestedMetaItem > ) {
89+ fn load_plugin ( & mut self , span : Span , name : Symbol , args : Vec < ast:: NestedMetaItem > ) {
9090 let registrar = self . reader . find_plugin_registrar ( span, name) ;
9191
9292 if let Some ( ( lib, disambiguator) ) = registrar {
0 commit comments