Skip to content

Commit a01bdbe

Browse files
committed
Don't reverse all the arguments to span_lint for lint checking passes.
1 parent de491ea commit a01bdbe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/rustc/middle/lint.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ fn check_item_while_true(cx: ty::ctxt, it: @ast::item) {
331331
alt cond.node {
332332
ast::expr_lit(@{node: ast::lit_bool(true),_}) {
333333
cx.sess.span_lint(
334-
while_true, it.id, e.id,
334+
while_true, e.id, it.id,
335335
e.span,
336336
"denote infinite loops with loop { ... }");
337337
}
@@ -357,14 +357,14 @@ fn check_item_ctypes(cx: ty::ctxt, it: @ast::item) {
357357
alt cx.def_map.get(id) {
358358
ast::def_prim_ty(ast::ty_int(ast::ty_i)) {
359359
cx.sess.span_lint(
360-
ctypes, fn_id, id,
360+
ctypes, id, fn_id,
361361
ty.span,
362362
"found rust type `int` in native module, while \
363363
libc::c_int or libc::c_long should be used");
364364
}
365365
ast::def_prim_ty(ast::ty_uint(ast::ty_u)) {
366366
cx.sess.span_lint(
367-
ctypes, fn_id, id,
367+
ctypes, id, fn_id,
368368
ty.span,
369369
"found rust type `uint` in native module, while \
370370
libc::c_uint or libc::c_ulong should be used");
@@ -400,7 +400,7 @@ fn check_item_path_statement(cx: ty::ctxt, it: @ast::item) {
400400
node: ast::expr_path(@path),
401401
span: _}, _) {
402402
cx.sess.span_lint(
403-
path_statement, it.id, id,
403+
path_statement, id, it.id,
404404
s.span,
405405
"path statement with no effect");
406406
}
@@ -423,7 +423,7 @@ fn check_item_old_vecs(cx: ty::ctxt, it: @ast::item) {
423423
ast::expr_lit(@{node: ast::lit_str(_), span:_})
424424
if ! uses_vstore.contains_key(e.id) {
425425
cx.sess.span_lint(
426-
old_vecs, it.id, e.id,
426+
old_vecs, e.id, it.id,
427427
e.span, "deprecated vec/str expr");
428428
}
429429
ast::expr_vstore(@inner, _) {
@@ -438,15 +438,15 @@ fn check_item_old_vecs(cx: ty::ctxt, it: @ast::item) {
438438
ast::ty_vec(_)
439439
if ! uses_vstore.contains_key(t.id) {
440440
cx.sess.span_lint(
441-
old_vecs, it.id, t.id,
441+
old_vecs, t.id, it.id,
442442
t.span, "deprecated vec type");
443443
}
444444

445445
ast::ty_path(@{span: _, global: _, idents: ids,
446446
rp: none, types: _}, _)
447447
if ids == [@"str"] && (! uses_vstore.contains_key(t.id)) {
448448
cx.sess.span_lint(
449-
old_vecs, it.id, t.id,
449+
old_vecs, t.id, it.id,
450450
t.span, "deprecated str type");
451451
}
452452

0 commit comments

Comments
 (0)