@@ -39,7 +39,7 @@ impl<'a> Parser<'a> {
3939 just_parsed_doc_comment = false ;
4040 }
4141 token:: DocComment ( s) => {
42- let attr = attr:: mk_sugared_doc_attr ( attr:: mk_attr_id ( ) , s, self . span ) ;
42+ let attr = attr:: mk_sugared_doc_attr ( attr:: mk_attr_id ( ) , s, self . token . span ) ;
4343 if attr. style != ast:: AttrStyle :: Outer {
4444 let mut err = self . fatal ( "expected outer doc comment" ) ;
4545 err. note ( "inner doc comments like this (starting with \
@@ -83,7 +83,7 @@ impl<'a> Parser<'a> {
8383 self . token) ;
8484 let ( span, path, tokens, style) = match self . token . kind {
8585 token:: Pound => {
86- let lo = self . span ;
86+ let lo = self . token . span ;
8787 self . bump ( ) ;
8888
8989 if let InnerAttributeParsePolicy :: Permitted = inner_parse_policy {
@@ -93,7 +93,7 @@ impl<'a> Parser<'a> {
9393 self . bump ( ) ;
9494 if let InnerAttributeParsePolicy :: NotPermitted { reason } = inner_parse_policy
9595 {
96- let span = self . span ;
96+ let span = self . token . span ;
9797 self . diagnostic ( )
9898 . struct_span_err ( span, reason)
9999 . note ( "inner attributes, like `#![no_std]`, annotate the item \
@@ -201,7 +201,7 @@ impl<'a> Parser<'a> {
201201 }
202202 token:: DocComment ( s) => {
203203 // we need to get the position of this token before we bump.
204- let attr = attr:: mk_sugared_doc_attr ( attr:: mk_attr_id ( ) , s, self . span ) ;
204+ let attr = attr:: mk_sugared_doc_attr ( attr:: mk_attr_id ( ) , s, self . token . span ) ;
205205 if attr. style == ast:: AttrStyle :: Inner {
206206 attrs. push ( attr) ;
207207 self . bump ( ) ;
@@ -249,7 +249,7 @@ impl<'a> Parser<'a> {
249249 return Ok ( meta) ;
250250 }
251251
252- let lo = self . span ;
252+ let lo = self . token . span ;
253253 let path = self . parse_path ( PathStyle :: Mod ) ?;
254254 let node = self . parse_meta_item_kind ( ) ?;
255255 let span = lo. to ( self . prev_span ) ;
@@ -284,7 +284,7 @@ impl<'a> Parser<'a> {
284284
285285 let found = self . this_token_to_string ( ) ;
286286 let msg = format ! ( "expected unsuffixed literal or identifier, found `{}`" , found) ;
287- Err ( self . diagnostic ( ) . struct_span_err ( self . span , & msg) )
287+ Err ( self . diagnostic ( ) . struct_span_err ( self . token . span , & msg) )
288288 }
289289
290290 /// matches meta_seq = ( COMMASEP(meta_item_inner) )
0 commit comments