Skip to content

Commit 0aeca1f

Browse files
committed
---
yaml --- r: 34047 b: refs/heads/snap-stage3 c: 94a7684 h: refs/heads/master i: 34045: dedde9d 34043: c979395 34039: f9c17b8 34031: 0751a17 34015: e435b36 33983: d333716 33919: ecb866d 33791: ee7a913 v: v3
1 parent 6e9040d commit 0aeca1f

File tree

4 files changed

+2
-39
lines changed

4 files changed

+2
-39
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 1abad3b4e6e30af2ae45dce5e17e91da31d73300
4+
refs/heads/snap-stage3: 94a76843f4e3d1c2054565593f39a2b75d69cf1a
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/lint.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ enum lint {
6060
unrecognized_lint,
6161
non_implicitly_copyable_typarams,
6262
vecs_implicitly_copyable,
63-
deprecated_item,
6463
deprecated_mode,
6564
deprecated_pattern,
6665
non_camel_case_types,
@@ -158,11 +157,6 @@ fn get_lint_dict() -> lint_dict {
158157
desc: ~"implicit copies of non implicitly copyable data",
159158
default: warn}),
160159

161-
(~"deprecated_item",
162-
@{lint: deprecated_item,
163-
desc: ~"warn about items marked deprecated",
164-
default: warn}),
165-
166160
(~"deprecated_mode",
167161
@{lint: deprecated_mode,
168162
desc: ~"warn about deprecated uses of modes",
@@ -418,7 +412,6 @@ fn check_item(i: @ast::item, cx: ty::ctxt) {
418412
check_item_non_camel_case_types(cx, i);
419413
check_item_heap(cx, i);
420414
check_item_structural_records(cx, i);
421-
check_item_deprecated(cx, i);
422415
check_item_deprecated_modes(cx, i);
423416
check_item_type_limits(cx, i);
424417
}
@@ -774,26 +767,6 @@ fn check_item_non_camel_case_types(cx: ty::ctxt, it: @ast::item) {
774767
}
775768
}
776769

777-
fn check_item_deprecated(tcx: ty::ctxt, it: @ast::item) {
778-
let at = attr::find_attrs_by_name(it.attrs, ~"deprecated");
779-
780-
if at.is_not_empty() {
781-
for at.each |attr| {
782-
let fmt = match attr.node.value.node {
783-
ast::meta_name_value(_, ref l) =>
784-
match l.node {
785-
ast::lit_str(ref reason) =>
786-
fmt!("deprecated: %s", **reason),
787-
_ => ~"item is deprecated"
788-
},
789-
_ => ~"item is deprecated"
790-
};
791-
tcx.sess.span_lint(deprecated_item, it.id, it.id, it.span,
792-
fmt);
793-
}
794-
}
795-
}
796-
797770
fn check_fn(tcx: ty::ctxt, fk: visit::fn_kind, decl: ast::fn_decl,
798771
_body: ast::blk, span: span, id: ast::node_id) {
799772
debug!("lint check_fn fk=%? id=%?", fk, id);

branches/snap-stage3/src/libsyntax/attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fn find_attrs_by_name(attrs: ~[ast::attribute], name: ~str) ->
182182
return vec::filter_map(attrs, filter);
183183
}
184184

185-
/// Search a list of meta items and return only those with a specific name
185+
/// Searcha list of meta items and return only those with a specific name
186186
fn find_meta_items_by_name(metas: ~[@ast::meta_item], name: ~str) ->
187187
~[@ast::meta_item] {
188188
let filter = fn@(m: &@ast::meta_item) -> Option<@ast::meta_item> {

branches/snap-stage3/src/test/compile-fail/lint-deprecated-items.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)