@@ -331,7 +331,7 @@ fn check_item_while_true(cx: ty::ctxt, it: @ast::item) {
331
331
alt cond. node {
332
332
ast : : expr_lit ( @{ node : ast:: lit_bool( true ) , _} ) {
333
333
cx. sess. span_lint(
334
- while_true, it . id, e . id,
334
+ while_true, e . id, it . id,
335
335
e. span,
336
336
"denote infinite loops with loop { ... }" ) ;
337
337
}
@@ -357,14 +357,14 @@ fn check_item_ctypes(cx: ty::ctxt, it: @ast::item) {
357
357
alt cx. def_map. get( id) {
358
358
ast:: def_prim_ty( ast:: ty_int( ast:: ty_i) ) {
359
359
cx. sess. span_lint(
360
- ctypes, fn_id , id ,
360
+ ctypes, id , fn_id ,
361
361
ty. span,
362
362
"found rust type `int` in native module, while \
363
363
libc::c_int or libc::c_long should be used") ;
364
364
}
365
365
ast:: def_prim_ty( ast:: ty_uint( ast:: ty_u) ) {
366
366
cx. sess. span_lint(
367
- ctypes, fn_id , id ,
367
+ ctypes, id , fn_id ,
368
368
ty. span,
369
369
"found rust type `uint` in native module, while \
370
370
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) {
400
400
node: ast:: expr_path( @path) ,
401
401
span: _} , _) {
402
402
cx. sess. span_lint(
403
- path_statement, it . id, id,
403
+ path_statement, id, it . id,
404
404
s. span,
405
405
"path statement with no effect") ;
406
406
}
@@ -423,7 +423,7 @@ fn check_item_old_vecs(cx: ty::ctxt, it: @ast::item) {
423
423
ast:: expr_lit( @{ node: ast:: lit_str( _) , span: _} )
424
424
if ! uses_vstore. contains_key( e. id) {
425
425
cx. sess. span_lint(
426
- old_vecs, it . id, e . id,
426
+ old_vecs, e . id, it . id,
427
427
e. span, "deprecated vec/str expr") ;
428
428
}
429
429
ast:: expr_vstore( @inner, _) {
@@ -438,15 +438,15 @@ fn check_item_old_vecs(cx: ty::ctxt, it: @ast::item) {
438
438
ast:: ty_vec( _)
439
439
if ! uses_vstore. contains_key( t. id) {
440
440
cx. sess. span_lint(
441
- old_vecs, it . id, t . id,
441
+ old_vecs, t . id, it . id,
442
442
t. span, "deprecated vec type ") ;
443
443
}
444
444
445
445
ast:: ty_path( @{ span: _, global: _, idents: ids,
446
446
rp: none, types: _} , _)
447
447
if ids == [ @"str "] && ( ! uses_vstore. contains_key( t. id) ) {
448
448
cx. sess. span_lint(
449
- old_vecs, it . id, t . id,
449
+ old_vecs, t . id, it . id,
450
450
t. span, "deprecated str type ") ;
451
451
}
452
452
0 commit comments