@@ -12,7 +12,7 @@ pub use self::AnnNode::*;
1212
1313use rustc_target:: spec:: abi:: Abi ;
1414use syntax:: ast;
15- use syntax:: codemap:: { CodeMap , Spanned } ;
15+ use syntax:: codemap:: CodeMap ;
1616use syntax:: parse:: ParseSess ;
1717use syntax:: parse:: lexer:: comments;
1818use syntax:: print:: pp:: { self , Breaks } ;
@@ -933,7 +933,7 @@ impl<'a> State<'a> {
933933 m : & hir:: MethodSig ,
934934 generics : & hir:: Generics ,
935935 vis : & hir:: Visibility ,
936- arg_names : & [ Spanned < ast:: Name > ] ,
936+ arg_names : & [ ast:: Ident ] ,
937937 body_id : Option < hir:: BodyId > )
938938 -> io:: Result < ( ) > {
939939 self . print_fn ( & m. decl ,
@@ -1380,7 +1380,7 @@ impl<'a> State<'a> {
13801380 }
13811381 hir:: ExprWhile ( ref test, ref blk, opt_label) => {
13821382 if let Some ( label) = opt_label {
1383- self . print_name ( label. name ) ?;
1383+ self . print_ident ( label. ident ) ?;
13841384 self . word_space ( ":" ) ?;
13851385 }
13861386 self . head ( "while" ) ?;
@@ -1390,7 +1390,7 @@ impl<'a> State<'a> {
13901390 }
13911391 hir:: ExprLoop ( ref blk, opt_label, _) => {
13921392 if let Some ( label) = opt_label {
1393- self . print_name ( label. name ) ?;
1393+ self . print_ident ( label. ident ) ?;
13941394 self . word_space ( ":" ) ?;
13951395 }
13961396 self . head ( "loop" ) ?;
@@ -1426,7 +1426,7 @@ impl<'a> State<'a> {
14261426 }
14271427 hir:: ExprBlock ( ref blk, opt_label) => {
14281428 if let Some ( label) = opt_label {
1429- self . print_name ( label. name ) ?;
1429+ self . print_ident ( label. ident ) ?;
14301430 self . word_space ( ":" ) ?;
14311431 }
14321432 // containing cbox, will be closed by print-block at }
@@ -1468,7 +1468,7 @@ impl<'a> State<'a> {
14681468 self . s . word ( "break" ) ?;
14691469 self . s . space ( ) ?;
14701470 if let Some ( label) = destination. label {
1471- self . print_name ( label. name ) ?;
1471+ self . print_ident ( label. ident ) ?;
14721472 self . s . space ( ) ?;
14731473 }
14741474 if let Some ( ref expr) = * opt_expr {
@@ -1480,7 +1480,7 @@ impl<'a> State<'a> {
14801480 self . s . word ( "continue" ) ?;
14811481 self . s . space ( ) ?;
14821482 if let Some ( label) = destination. label {
1483- self . print_name ( label. name ) ?;
1483+ self . print_ident ( label. ident ) ?;
14841484 self . s . space ( ) ?
14851485 }
14861486 }
@@ -1784,7 +1784,7 @@ impl<'a> State<'a> {
17841784 // is that it doesn't matter
17851785 match pat. node {
17861786 PatKind :: Wild => self . s . word ( "_" ) ?,
1787- PatKind :: Binding ( binding_mode, _, ref path1 , ref sub) => {
1787+ PatKind :: Binding ( binding_mode, _, ident , ref sub) => {
17881788 match binding_mode {
17891789 hir:: BindingAnnotation :: Ref => {
17901790 self . word_nbsp ( "ref" ) ?;
@@ -1799,7 +1799,7 @@ impl<'a> State<'a> {
17991799 self . word_nbsp ( "mut" ) ?;
18001800 }
18011801 }
1802- self . print_name ( path1 . node ) ?;
1802+ self . print_ident ( ident ) ?;
18031803 if let Some ( ref p) = * sub {
18041804 self . s . word ( "@" ) ?;
18051805 self . print_pat ( & p) ?;
@@ -1964,7 +1964,7 @@ impl<'a> State<'a> {
19641964 match arm. body . node {
19651965 hir:: ExprBlock ( ref blk, opt_label) => {
19661966 if let Some ( label) = opt_label {
1967- self . print_name ( label. name ) ?;
1967+ self . print_ident ( label. ident ) ?;
19681968 self . word_space ( ":" ) ?;
19691969 }
19701970 // the block will close the pattern's ibox
@@ -1990,7 +1990,7 @@ impl<'a> State<'a> {
19901990 name : Option < ast:: Name > ,
19911991 generics : & hir:: Generics ,
19921992 vis : & hir:: Visibility ,
1993- arg_names : & [ Spanned < ast:: Name > ] ,
1993+ arg_names : & [ ast:: Ident ] ,
19941994 body_id : Option < hir:: BodyId > )
19951995 -> io:: Result < ( ) > {
19961996 self . print_fn_header_info ( header, vis) ?;
@@ -2007,8 +2007,8 @@ impl<'a> State<'a> {
20072007 assert ! ( arg_names. is_empty( ) || body_id. is_none( ) ) ;
20082008 self . commasep ( Inconsistent , & decl. inputs , |s, ty| {
20092009 s. ibox ( indent_unit) ?;
2010- if let Some ( name ) = arg_names. get ( i) {
2011- s. s . word ( & name . node . as_str ( ) ) ?;
2010+ if let Some ( arg_name ) = arg_names. get ( i) {
2011+ s. s . word ( & arg_name . as_str ( ) ) ?;
20122012 s. s . word ( ":" ) ?;
20132013 s. s . space ( ) ?;
20142014 } else if let Some ( body_id) = body_id {
@@ -2242,7 +2242,7 @@ impl<'a> State<'a> {
22422242 decl : & hir:: FnDecl ,
22432243 name : Option < ast:: Name > ,
22442244 generic_params : & [ hir:: GenericParam ] ,
2245- arg_names : & [ Spanned < ast:: Name > ] )
2245+ arg_names : & [ ast:: Ident ] )
22462246 -> io:: Result < ( ) > {
22472247 self . ibox ( indent_unit) ?;
22482248 if !generic_params. is_empty ( ) {
0 commit comments