@@ -11,20 +11,20 @@ extern crate syntax;
11
11
extern crate rustc_plugin;
12
12
13
13
use syntax:: ast;
14
- use syntax:: ast:: { ItemKind , StmtKind , Stmt , TyKind } ;
14
+ use syntax:: ast:: { Ident , ItemKind , StmtKind , Stmt , TyKind } ;
15
15
use syntax:: codemap;
16
- use syntax:: parse:: token;
17
16
use syntax:: ext:: base:: { ExtCtxt , MultiModifier , Annotatable } ;
18
17
use syntax:: ext:: build:: AstBuilder ;
19
18
use syntax:: ptr:: P ;
19
+ use syntax:: symbol:: Symbol ;
20
20
21
21
use rustc_plugin:: Registry ;
22
22
23
23
/// For the `#[quickcheck]` attribute. Do not use.
24
24
#[ plugin_registrar]
25
25
#[ doc( hidden) ]
26
26
pub fn plugin_registrar ( reg : & mut Registry ) {
27
- reg. register_syntax_extension ( token :: intern ( "quickcheck" ) ,
27
+ reg. register_syntax_extension ( Symbol :: intern ( "quickcheck" ) ,
28
28
MultiModifier ( Box :: new ( expand_meta_quickcheck) ) ) ;
29
29
}
30
30
@@ -83,7 +83,7 @@ fn wrap_item(cx: &mut ExtCtxt,
83
83
// Copy original function without attributes
84
84
let prop = P ( ast:: Item { attrs : Vec :: new ( ) , ..item. clone ( ) } ) ;
85
85
// ::quickcheck::quickcheck
86
- let check_ident = token :: str_to_ident ( "quickcheck" ) ;
86
+ let check_ident = Ident :: from_str ( "quickcheck" ) ;
87
87
let check_path = vec ! ( check_ident, check_ident) ;
88
88
// Wrap original function in new outer function,
89
89
// calling ::quickcheck::quickcheck()
@@ -104,7 +104,7 @@ fn wrap_item(cx: &mut ExtCtxt,
104
104
let mut attrs = item. attrs . clone ( ) ;
105
105
// Add #[test] attribute
106
106
attrs. push ( cx. attribute (
107
- span, cx. meta_word ( span, token :: intern_and_get_ident ( "test" ) ) ) ) ;
107
+ span, cx. meta_word ( span, Symbol :: intern ( "test" ) ) ) ) ;
108
108
// Attach the attributes to the outer function
109
109
Annotatable :: Item ( P ( ast:: Item { attrs : attrs, ..( * test) . clone ( ) } ) )
110
110
}
0 commit comments