@@ -39,7 +39,7 @@ impl<'a> Parser<'a> {
39
39
just_parsed_doc_comment = false ;
40
40
}
41
41
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 ) ;
43
43
if attr. style != ast:: AttrStyle :: Outer {
44
44
let mut err = self . fatal ( "expected outer doc comment" ) ;
45
45
err. note ( "inner doc comments like this (starting with \
@@ -83,7 +83,7 @@ impl<'a> Parser<'a> {
83
83
self . token) ;
84
84
let ( span, path, tokens, style) = match self . token . kind {
85
85
token:: Pound => {
86
- let lo = self . span ;
86
+ let lo = self . token . span ;
87
87
self . bump ( ) ;
88
88
89
89
if let InnerAttributeParsePolicy :: Permitted = inner_parse_policy {
@@ -93,7 +93,7 @@ impl<'a> Parser<'a> {
93
93
self . bump ( ) ;
94
94
if let InnerAttributeParsePolicy :: NotPermitted { reason } = inner_parse_policy
95
95
{
96
- let span = self . span ;
96
+ let span = self . token . span ;
97
97
self . diagnostic ( )
98
98
. struct_span_err ( span, reason)
99
99
. note ( "inner attributes, like `#![no_std]`, annotate the item \
@@ -201,7 +201,7 @@ impl<'a> Parser<'a> {
201
201
}
202
202
token:: DocComment ( s) => {
203
203
// 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 ) ;
205
205
if attr. style == ast:: AttrStyle :: Inner {
206
206
attrs. push ( attr) ;
207
207
self . bump ( ) ;
@@ -249,7 +249,7 @@ impl<'a> Parser<'a> {
249
249
return Ok ( meta) ;
250
250
}
251
251
252
- let lo = self . span ;
252
+ let lo = self . token . span ;
253
253
let path = self . parse_path ( PathStyle :: Mod ) ?;
254
254
let node = self . parse_meta_item_kind ( ) ?;
255
255
let span = lo. to ( self . prev_span ) ;
@@ -284,7 +284,7 @@ impl<'a> Parser<'a> {
284
284
285
285
let found = self . this_token_to_string ( ) ;
286
286
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) )
288
288
}
289
289
290
290
/// matches meta_seq = ( COMMASEP(meta_item_inner) )
0 commit comments