@@ -1432,7 +1432,7 @@ impl<'a> TraitDef<'a> {
14321432 let mut named_idents = Vec :: new ( ) ;
14331433 let mut just_spans = Vec :: new ( ) ;
14341434 for field in struct_def. fields ( ) {
1435- let sp = field. span . with_ctxt ( self . span . ctxt ( ) ) ;
1435+ let sp = field. span ( ) . with_ctxt ( self . span . ctxt ( ) ) ;
14361436 match field. ident {
14371437 Some ( ident) => named_idents. push ( ( ident, sp) ) ,
14381438 _ => just_spans. push ( sp) ,
@@ -1466,7 +1466,7 @@ impl<'a> TraitDef<'a> {
14661466 . map ( |prefix| {
14671467 let pieces_iter =
14681468 struct_def. fields ( ) . iter ( ) . enumerate ( ) . map ( |( i, struct_field) | {
1469- let sp = struct_field. span . with_ctxt ( self . span . ctxt ( ) ) ;
1469+ let sp = struct_field. span ( ) . with_ctxt ( self . span . ctxt ( ) ) ;
14701470 let ident = self . mk_pattern_ident ( prefix, i) ;
14711471 let path = ident. with_span_pos ( sp) ;
14721472 (
@@ -1528,7 +1528,7 @@ impl<'a> TraitDef<'a> {
15281528 . map ( |( i, struct_field) | {
15291529 // For this field, get an expr for each selflike_arg. E.g. for
15301530 // `PartialEq::eq`, one for each of `&self` and `other`.
1531- let sp = struct_field. span . with_ctxt ( self . span . ctxt ( ) ) ;
1531+ let sp = struct_field. span ( ) . with_ctxt ( self . span . ctxt ( ) ) ;
15321532 let mut exprs: Vec < _ > = mk_exprs ( i, struct_field, sp) ;
15331533 let self_expr = exprs. remove ( 0 ) ;
15341534 let other_selflike_exprs = exprs;
@@ -1583,7 +1583,7 @@ impl<'a> TraitDef<'a> {
15831583 ast:: ExprKind :: Field (
15841584 selflike_arg. clone ( ) ,
15851585 struct_field. ident . unwrap_or_else ( || {
1586- Ident :: from_str_and_span ( & i. to_string ( ) , struct_field. span )
1586+ Ident :: from_str_and_span ( & i. to_string ( ) , struct_field. span ( ) )
15871587 } ) ,
15881588 ) ,
15891589 ) ;
@@ -1631,7 +1631,7 @@ impl<'a> TraitDef<'a> {
16311631 } else {
16321632 // Wrap the expression in `{...}`, causing a copy.
16331633 field_expr = cx. expr_block (
1634- cx. block ( struct_field. span , thin_vec ! [ cx. stmt_expr( field_expr) ] ) ,
1634+ cx. block ( struct_field. span ( ) , thin_vec ! [ cx. stmt_expr( field_expr) ] ) ,
16351635 ) ;
16361636 }
16371637 }
0 commit comments