Skip to content

Commit 808aada

Browse files
committed
auto merge of rust-lang#6654 : sanxiyn/rust/accurate-span-2, r=bstrie
2 parents dc7b83d + 258d20e commit 808aada

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc/middle/resolve.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5125,7 +5125,7 @@ pub impl Resolver {
51255125
view_path_simple(_, _, id) | view_path_glob(_, id) => {
51265126
if !self.used_imports.contains(&id) {
51275127
self.session.add_lint(unused_imports,
5128-
id, vi.span,
5128+
id, p.span,
51295129
~"unused import");
51305130
}
51315131
}

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ pub impl Parser {
13111311
ex = expr_vec(~[first_expr], mutbl);
13121312
}
13131313
}
1314-
hi = self.span.hi;
1314+
hi = self.last_span.hi;
13151315
} else if self.eat_keyword("__log") {
13161316
// LOG expression
13171317
self.expect(&token::LPAREN);

0 commit comments

Comments
 (0)