@@ -43,12 +43,10 @@ enum lint {
4343 unused_imports,
4444 while_true,
4545 path_statement,
46- old_vecs ,
46+ implicit_copies ,
4747 unrecognized_warning,
4848 non_implicitly_copyable_typarams,
4949 vecs_not_implicitly_copyable,
50- implicit_copies,
51- old_strs,
5250}
5351
5452// This is pretty unfortunate. We really want some sort of "deriving Enum"
@@ -59,12 +57,10 @@ fn int_to_lint(i: int) -> lint {
5957 1 { unused_imports }
6058 2 { while_true }
6159 3 { path_statement }
62- 4 { old_vecs }
60+ 4 { implicit_copies }
6361 5 { unrecognized_warning }
6462 6 { non_implicitly_copyable_typarams }
6563 7 { vecs_not_implicitly_copyable }
66- 8 { implicit_copies }
67- 9 { old_strs }
6864 }
6965}
7066
@@ -104,16 +100,6 @@ fn get_lint_dict() -> lint_dict {
104100 desc: ~"path statements with no effect" ,
105101 default: warn} ) ,
106102
107- ( ~"old_vecs",
108- @{ lint: old_vecs,
109- desc: ~"old ( deprecated) vectors",
110- default : error} ) ,
111-
112- ( ~"old_strs",
113- @{ lint: old_strs,
114- desc: ~"old ( deprecated) strings",
115- default : error} ) ,
116-
117103 ( ~"unrecognized_warning",
118104 @{ lint: unrecognized_warning,
119105 desc: ~"unrecognized warning attribute",
@@ -321,7 +307,6 @@ fn check_item(i: @ast::item, cx: ty::ctxt) {
321307 check_item_ctypes( cx, i) ;
322308 check_item_while_true( cx, i) ;
323309 check_item_path_statement( cx, i) ;
324- check_item_old_vecs( cx, i) ;
325310}
326311
327312// Take a visitor, and modify it so that it will not proceed past subitems.
@@ -422,63 +407,6 @@ fn check_item_path_statement(cx: ty::ctxt, it: @ast::item) {
422407 visit:: visit_item ( it, ( ) , visit) ;
423408}
424409
425- fn check_item_old_vecs( cx : ty:: ctxt , it : @ast:: item ) {
426- let uses_vstore = int_hash ( ) ;
427-
428- let visit = item_stopping_visitor( visit:: mk_simple_visitor( @{
429-
430- visit_expr : fn @( e: @ast:: expr) {
431- alt e. node {
432- ast:: expr_vec ( _, _)
433- if ! uses_vstore. contains_key ( e. id ) {
434- cx. sess . span_lint (
435- old_vecs, e. id , it. id ,
436- e. span , ~"deprecated vec expr") ;
437- }
438- ast:: expr_lit ( @{ node: ast:: lit_str ( _) , span: _} )
439- if ! uses_vstore. contains_key ( e. id ) {
440- cx. sess . span_lint (
441- old_strs, e. id , it. id ,
442- e. span , ~"deprecated str expr") ;
443- }
444-
445- ast:: expr_vstore ( @inner, _) {
446- uses_vstore. insert ( inner. id , true ) ;
447- }
448- _ { }
449- }
450- } ,
451-
452- visit_ty : fn @( t: @ast:: ty) {
453- alt t. node {
454- ast:: ty_vec ( _)
455- if ! uses_vstore. contains_key ( t. id ) {
456- cx. sess . span_lint (
457- old_vecs, t. id , it. id ,
458- t. span , ~"deprecated vec type ") ;
459- }
460- ast:: ty_path ( @{ span: _, global: _, idents: ids,
461- rp: none, types: _} , _)
462- if ids == ~[ @~"str"] && ( ! uses_vstore. contains_key ( t. id ) ) {
463- cx. sess . span_lint (
464- old_strs, t. id , it. id ,
465- t. span , ~"deprecated str type ") ;
466- }
467- ast:: ty_fixed_length ( inner, _) |
468- ast:: ty_box ( { ty: inner, _} ) |
469- ast:: ty_uniq ( { ty: inner, _} ) |
470- ast:: ty_rptr ( _, { ty: inner, _} ) {
471- uses_vstore. insert ( inner. id , true ) ;
472- }
473- _ { }
474- }
475- }
476-
477- with * visit:: default_simple_visitor ( )
478- } ) ) ;
479- visit:: visit_item ( it, ( ) , visit) ;
480- }
481-
482410fn check_crate ( tcx : ty:: ctxt , crate : @ast:: crate ) {
483411
484412 let v = visit:: mk_simple_visitor ( @{
0 commit comments