Skip to content

Commit 238178a

Browse files
committed
---
yaml --- r: 146834 b: refs/heads/try2 c: 1f7bfac h: refs/heads/master v: v3
1 parent a5bdb57 commit 238178a

File tree

7 files changed

+14
-60
lines changed

7 files changed

+14
-60
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6ff697d3933754bf9ec5ee5875f487f02a7d087d
8+
refs/heads/try2: 1f7bfac9d28340b3eda0291dd01b7914c77a88ae
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/lint.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,11 @@ fn check_heap_item(cx: &Context, it: &ast::item) {
803803
// also make error on obsolete attributes for less confusion.
804804
fn check_item_attribute_usage(cx: &Context, it: &ast::item) {
805805
let crate_attrs = ["crate_type", "link", "feature", "no_uv", "no_main", "no_std"];
806+
let obsolete_attrs = [
807+
("abi", "extern \"abi\" fn"),
808+
("auto_encode", "#[deriving(Encodable)]"),
809+
("auto_decode", "#[deriving(Decodable)]"),
810+
];
806811

807812
for attr in it.attrs.iter() {
808813
let name = attr.node.value.name();
@@ -816,6 +821,13 @@ fn check_item_attribute_usage(cx: &Context, it: &ast::item) {
816821
cx.span_lint(attribute_usage, attr.span, msg);
817822
}
818823
}
824+
825+
for &(obs_attr, obs_alter) in obsolete_attrs.iter() {
826+
if name.equiv(&obs_attr) {
827+
cx.span_lint(attribute_usage, attr.span,
828+
format!("obsolete attribute: use `{:s}` instead", obs_alter));
829+
}
830+
}
819831
}
820832
}
821833

branches/try2/src/libstd/io/native/process.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ fn spawn_process_os(prog: &str, args: &[~str],
365365
use libc::funcs::bsd44::getdtablesize;
366366

367367
mod rustrt {
368-
#[abi = "cdecl"]
369368
extern {
370369
pub fn rust_unset_sigprocmask();
371370
}

branches/try2/src/libsyntax/ext/auto_encode.rs

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

branches/try2/src/libsyntax/ext/base.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub enum MacResult {
143143
}
144144

145145
pub enum SyntaxExtension {
146-
// #[auto_encode] and such
146+
// #[deriving] and such
147147
ItemDecorator(ItemDecorator),
148148

149149
// Token-tree expanders
@@ -229,12 +229,6 @@ pub fn syntax_expander_table() -> SyntaxEnv {
229229
syntax_expanders.insert(intern(&"format_args"),
230230
builtin_normal_tt_no_ctxt(
231231
ext::format::expand_args));
232-
syntax_expanders.insert(
233-
intern(&"auto_encode"),
234-
@SE(ItemDecorator(ext::auto_encode::expand_auto_encode)));
235-
syntax_expanders.insert(
236-
intern(&"auto_decode"),
237-
@SE(ItemDecorator(ext::auto_encode::expand_auto_decode)));
238232
syntax_expanders.insert(intern(&"env"),
239233
builtin_normal_tt_no_ctxt(
240234
ext::env::expand_env));

branches/try2/src/libsyntax/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ pub mod ext {
8383
pub mod concat;
8484
pub mod concat_idents;
8585
pub mod log_syntax;
86-
pub mod auto_encode;
8786
pub mod source_util;
8887

8988
pub mod trace_macros;

branches/try2/src/test/compile-fail/deprecated-auto-code.rs

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

0 commit comments

Comments
 (0)