@@ -19,7 +19,7 @@ use syntax::source_map::{FileName, FilePathMapping};
1919use  syntax:: edition:: { Edition ,  EDITION_NAME_LIST ,  DEFAULT_EDITION } ; 
2020use  syntax:: parse:: token; 
2121use  syntax:: parse; 
22- use  syntax:: symbol:: Symbol ; 
22+ use  syntax:: symbol:: { sym ,   Symbol } ; 
2323use  syntax:: feature_gate:: UnstableFeatures ; 
2424use  errors:: emitter:: HumanReadableErrorType ; 
2525
@@ -1503,31 +1503,31 @@ pub fn default_configuration(sess: &Session) -> ast::CrateConfig {
15031503        Some ( Symbol :: intern ( vendor) ) , 
15041504    ) ) ; 
15051505    if  sess. target . target . options . has_elf_tls  { 
1506-         ret. insert ( ( Symbol :: intern ( " target_thread_local" ) ,  None ) ) ; 
1506+         ret. insert ( ( sym :: target_thread_local,  None ) ) ; 
15071507    } 
15081508    for  & i in  & [ 8 ,  16 ,  32 ,  64 ,  128 ]  { 
15091509        if  i >= min_atomic_width && i <= max_atomic_width { 
15101510            let  s = i. to_string ( ) ; 
15111511            ret. insert ( ( 
1512-                 Symbol :: intern ( " target_has_atomic" ) , 
1512+                 sym :: target_has_atomic, 
15131513                Some ( Symbol :: intern ( & s) ) , 
15141514            ) ) ; 
15151515            if  & s == wordsz { 
15161516                ret. insert ( ( 
1517-                     Symbol :: intern ( " target_has_atomic" ) , 
1517+                     sym :: target_has_atomic, 
15181518                    Some ( Symbol :: intern ( "ptr" ) ) , 
15191519                ) ) ; 
15201520            } 
15211521        } 
15221522    } 
15231523    if  atomic_cas { 
1524-         ret. insert ( ( Symbol :: intern ( " target_has_atomic" ) ,  Some ( Symbol :: intern ( "cas" ) ) ) ) ; 
1524+         ret. insert ( ( sym :: target_has_atomic,  Some ( Symbol :: intern ( "cas" ) ) ) ) ; 
15251525    } 
15261526    if  sess. opts . debug_assertions  { 
15271527        ret. insert ( ( Symbol :: intern ( "debug_assertions" ) ,  None ) ) ; 
15281528    } 
15291529    if  sess. opts . crate_types . contains ( & CrateType :: ProcMacro )  { 
1530-         ret. insert ( ( Symbol :: intern ( " proc_macro" ) ,  None ) ) ; 
1530+         ret. insert ( ( sym :: proc_macro,  None ) ) ; 
15311531    } 
15321532    ret
15331533} 
@@ -1547,7 +1547,7 @@ pub fn build_configuration(sess: &Session, mut user_cfg: ast::CrateConfig) -> as
15471547    let  default_cfg = default_configuration ( sess) ; 
15481548    // If the user wants a test runner, then add the test cfg 
15491549    if  sess. opts . test  { 
1550-         user_cfg. insert ( ( Symbol :: intern ( " test" ) ,  None ) ) ; 
1550+         user_cfg. insert ( ( sym :: test,  None ) ) ; 
15511551    } 
15521552    user_cfg. extend ( default_cfg. iter ( ) . cloned ( ) ) ; 
15531553    user_cfg
@@ -2702,7 +2702,7 @@ mod tests {
27022702    use  std:: path:: PathBuf ; 
27032703    use  super :: { Externs ,  OutputType ,  OutputTypes } ; 
27042704    use  rustc_target:: spec:: { MergeFunctions ,  PanicStrategy ,  RelroLevel } ; 
2705-     use  syntax:: symbol:: Symbol ; 
2705+     use  syntax:: symbol:: sym ; 
27062706    use  syntax:: edition:: { Edition ,  DEFAULT_EDITION } ; 
27072707    use  syntax; 
27082708    use  super :: Options ; 
@@ -2744,15 +2744,14 @@ mod tests {
27442744            let  ( sessopts,  cfg)  = build_session_options_and_crate_config ( matches) ; 
27452745            let  sess = build_session ( sessopts,  None ,  registry) ; 
27462746            let  cfg = build_configuration ( & sess,  to_crate_config ( cfg) ) ; 
2747-             assert ! ( cfg. contains( & ( Symbol :: intern ( " test" ) ,  None ) ) ) ; 
2747+             assert ! ( cfg. contains( & ( sym :: test,  None ) ) ) ; 
27482748        } ) ; 
27492749    } 
27502750
27512751    // When the user supplies --test and --cfg test, don't implicitly add 
27522752    // another --cfg test 
27532753    #[ test]  
27542754    fn  test_switch_implies_cfg_test_unless_cfg_test ( )  { 
2755-         use  syntax:: symbol:: sym; 
27562755        syntax:: with_default_globals ( || { 
27572756            let  matches = & match  optgroups ( ) . parse ( & [ "--test" . to_string ( ) , 
27582757                                                     "--cfg=test" . to_string ( ) ] )  { 
0 commit comments