1- use syntax:: ast:: { self , MetaItem } ;
1+ use syntax:: ast:: { self , MetaItem , MetaItemKind , TyKind } ;
22use syntax:: attr:: AttrMetaMethods ;
33use syntax:: codemap:: Span ;
44use syntax:: ext:: base:: { Annotatable , ExtCtxt } ;
@@ -37,7 +37,7 @@ struct ChangesetOptions {
3737
3838fn changeset_options ( cx : & mut ExtCtxt , meta_item : & MetaItem ) -> Result < ChangesetOptions , ( ) > {
3939 match meta_item. node {
40- ast :: MetaList ( _, ref meta_items) => {
40+ MetaItemKind :: List ( _, ref meta_items) => {
4141 let table_name = try!( table_name ( cx, & meta_items[ 0 ] ) ) ;
4242 let treat_none_as_null = try!( boolean_option ( cx, & meta_items[ 1 ..] , "treat_none_as_null" ) )
4343 . unwrap_or ( false ) ;
@@ -52,7 +52,7 @@ fn changeset_options(cx: &mut ExtCtxt, meta_item: &MetaItem) -> Result<Changeset
5252
5353fn table_name ( cx : & mut ExtCtxt , meta_item : & MetaItem ) -> Result < InternedString , ( ) > {
5454 match meta_item. node {
55- ast :: MetaWord ( ref word) => Ok ( word. clone ( ) ) ,
55+ MetaItemKind :: Word ( ref word) => Ok ( word. clone ( ) ) ,
5656 _ => usage_error ( cx, meta_item) ,
5757 }
5858}
@@ -93,7 +93,7 @@ fn changeset_impl(
9393 let table_name = options. table_name ;
9494 let attrs_for_changeset = model. attrs . iter ( ) . filter ( |a| a. column_name != pk)
9595 . collect :: < Vec < _ > > ( ) ;
96- let changeset_ty = cx. ty ( span, ast :: TyTup (
96+ let changeset_ty = cx. ty ( span, TyKind :: Tup (
9797 attrs_for_changeset. iter ( )
9898 . map ( |a| changeset_ty ( cx, span, & options, a) )
9999 . collect ( )
0 commit comments