Skip to content

Commit bad1dab

Browse files
committed
syntax: Correct span for provided trait methods.
1 parent 1145371 commit bad1dab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,9 +1075,9 @@ impl<'a> Parser<'a> {
10751075
p.parse_arg_general(false)
10761076
});
10771077

1078-
let hi = p.last_span.hi;
10791078
match p.token {
10801079
token::SEMI => {
1080+
let hi = p.last_span.hi;
10811081
p.bump();
10821082
debug!("parse_trait_methods(): parsing required method");
10831083
// NB: at the moment, visibility annotations on required
@@ -1100,6 +1100,7 @@ impl<'a> Parser<'a> {
11001100
debug!("parse_trait_methods(): parsing provided method");
11011101
let (inner_attrs, body) =
11021102
p.parse_inner_attrs_and_block();
1103+
let hi = p.last_span.hi;
11031104
let attrs = attrs.append(inner_attrs.as_slice());
11041105
Provided(@ast::Method {
11051106
ident: ident,

0 commit comments

Comments
 (0)