diff --git a/src/etc/combine-tests.py b/src/etc/combine-tests.py index ce788f06c38da..aaba80aa44640 100755 --- a/src/etc/combine-tests.py +++ b/src/etc/combine-tests.py @@ -46,7 +46,6 @@ def scrub(b): // AUTO-GENERATED FILE: DO NOT EDIT #[crate_id=\"run_pass_stage2#0.1\"]; #[pkgid=\"run_pass_stage2#0.1\"]; -#[link(name=\"run_pass_stage2\", vers=\"0.1\")]; #[feature(globs, macro_rules, struct_variant, managed_boxes)]; #[allow(warnings)]; """ diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index 9ec0fa337168c..5a74fdb6d86dc 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -872,6 +872,12 @@ fn check_crate_attrs_usage(cx: &Context, attrs: &[ast::Attribute]) { if !iter.any(|other_attr| { name.equiv(other_attr) }) { cx.span_lint(attribute_usage, attr.span, "unknown crate attribute"); } + if name.equiv(& &"link") { + cx.tcx.sess.span_err(attr.span, + "obsolete crate `link` attribute"); + cx.tcx.sess.note("the link attribute has been superceded by the crate_id \ + attribute, which has the format `#[crate_id = \"name#version\"]`"); + } } } diff --git a/src/test/auxiliary/cci_impl_lib.rs b/src/test/auxiliary/cci_impl_lib.rs index 1f5c98cd7e1c7..28c0c3062f3f5 100644 --- a/src/test/auxiliary/cci_impl_lib.rs +++ b/src/test/auxiliary/cci_impl_lib.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="cci_impl_lib"]; -// NOTE: remove after the next snapshot -#[link(name="cci_impl_lib", vers="0.0")]; trait uint_helpers { fn to(&self, v: uint, f: |uint|); diff --git a/src/test/auxiliary/cci_iter_lib.rs b/src/test/auxiliary/cci_iter_lib.rs index 672d06f1ccba3..937f1bb33862f 100644 --- a/src/test/auxiliary/cci_iter_lib.rs +++ b/src/test/auxiliary/cci_iter_lib.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="cci_iter_lib"]; -// NOTE: remove after the next snapshot -#[link(name="cci_iter_lib", vers="0.0")]; #[inline] pub fn iter(v: &[T], f: |&T|) { diff --git a/src/test/auxiliary/cci_no_inline_lib.rs b/src/test/auxiliary/cci_no_inline_lib.rs index ef832d8e443f5..87689474ca3e9 100644 --- a/src/test/auxiliary/cci_no_inline_lib.rs +++ b/src/test/auxiliary/cci_no_inline_lib.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="cci_no_inline_lib"]; -// NOTE: remove after the next snapshot -#[link(name="cci_no_inline_lib", vers="0.0")]; // same as cci_iter_lib, more-or-less, but not marked inline pub fn iter(v: ~[uint], f: |uint|) { diff --git a/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs b/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs index a5e10eaaf6872..5fd0a5b31ee71 100644 --- a/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs +++ b/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs @@ -10,8 +10,6 @@ #[feature(managed_boxes)]; #[crate_id="crate_method_reexport_grrrrrrr2"]; -// NOTE: remove after the next snapshot -#[link(name = "crate_method_reexport_grrrrrrr2")]; pub use name_pool::add; diff --git a/src/test/auxiliary/crateresolve1-1.rs b/src/test/auxiliary/crateresolve1-1.rs index 1188626242b64..11324f4a21b7c 100644 --- a/src/test/auxiliary/crateresolve1-1.rs +++ b/src/test/auxiliary/crateresolve1-1.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve1#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve1", - vers = "0.1")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve1-2.rs b/src/test/auxiliary/crateresolve1-2.rs index f0d69b3eaafa1..d1edbf5d681dc 100644 --- a/src/test/auxiliary/crateresolve1-2.rs +++ b/src/test/auxiliary/crateresolve1-2.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve1#0.2"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve1", - vers = "0.2")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve1-3.rs b/src/test/auxiliary/crateresolve1-3.rs index fe62de2d409a3..0d1e9eab62b76 100644 --- a/src/test/auxiliary/crateresolve1-3.rs +++ b/src/test/auxiliary/crateresolve1-3.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve1#0.3"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve1", - vers = "0.3")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve2-1.rs b/src/test/auxiliary/crateresolve2-1.rs index 7d64c24798bdd..6a5e988dcdf4a 100644 --- a/src/test/auxiliary/crateresolve2-1.rs +++ b/src/test/auxiliary/crateresolve2-1.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve2#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve2", - vers = "0.1")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve2-2.rs b/src/test/auxiliary/crateresolve2-2.rs index bd7fb7cfa8152..fa10154eb64c4 100644 --- a/src/test/auxiliary/crateresolve2-2.rs +++ b/src/test/auxiliary/crateresolve2-2.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve2#0.2"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve2", - vers = "0.2")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve2-3.rs b/src/test/auxiliary/crateresolve2-3.rs index 64aeca48608b6..f93ca930be575 100644 --- a/src/test/auxiliary/crateresolve2-3.rs +++ b/src/test/auxiliary/crateresolve2-3.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve2#0.3"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve2", - vers = "0.3")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve3-1.rs b/src/test/auxiliary/crateresolve3-1.rs index ae6fe53ab4793..a5d30ea28910f 100644 --- a/src/test/auxiliary/crateresolve3-1.rs +++ b/src/test/auxiliary/crateresolve3-1.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve3#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve3", - vers = "0.1")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve3-2.rs b/src/test/auxiliary/crateresolve3-2.rs index b77e147c63556..f9a2b45b4a380 100644 --- a/src/test/auxiliary/crateresolve3-2.rs +++ b/src/test/auxiliary/crateresolve3-2.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve3#0.2"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve3", - vers = "0.2")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve4a-1.rs b/src/test/auxiliary/crateresolve4a-1.rs index 683a46ceecd7b..ad48aea3c2a24 100644 --- a/src/test/auxiliary/crateresolve4a-1.rs +++ b/src/test/auxiliary/crateresolve4a-1.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="crateresolve4a#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve4a", vers = "0.1")]; #[crate_type = "lib"]; pub fn f() -> int { 10 } diff --git a/src/test/auxiliary/crateresolve4a-2.rs b/src/test/auxiliary/crateresolve4a-2.rs index 6facf02d923b0..cee5e9711d4c3 100644 --- a/src/test/auxiliary/crateresolve4a-2.rs +++ b/src/test/auxiliary/crateresolve4a-2.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="crateresolve4a#0.2"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve4a", vers= "0.2")]; #[crate_type = "lib"]; pub fn g() -> int { 20 } diff --git a/src/test/auxiliary/crateresolve4b-1.rs b/src/test/auxiliary/crateresolve4b-1.rs index e19cd6c73d201..c80fb8ee9e965 100644 --- a/src/test/auxiliary/crateresolve4b-1.rs +++ b/src/test/auxiliary/crateresolve4b-1.rs @@ -11,8 +11,6 @@ // aux-build:crateresolve4a-1.rs // aux-build:crateresolve4a-2.rs #[crate_id="crateresolve4b#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve4b", vers = "0.1")]; #[crate_type = "lib"]; extern mod crateresolve4a = "crateresolve4a#0.2"; diff --git a/src/test/auxiliary/crateresolve4b-2.rs b/src/test/auxiliary/crateresolve4b-2.rs index 2c00d9aab8d99..019b6047e63dd 100644 --- a/src/test/auxiliary/crateresolve4b-2.rs +++ b/src/test/auxiliary/crateresolve4b-2.rs @@ -11,8 +11,6 @@ // aux-build:crateresolve4a-1.rs // aux-build:crateresolve4a-2.rs #[crate_id="crateresolve4b#0.2"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve4b", vers = "0.2")]; #[crate_type = "lib"]; extern mod crateresolve4a = "crateresolve4a#0.1"; diff --git a/src/test/auxiliary/crateresolve5-1.rs b/src/test/auxiliary/crateresolve5-1.rs index f619499f4f442..0336abae19c4e 100644 --- a/src/test/auxiliary/crateresolve5-1.rs +++ b/src/test/auxiliary/crateresolve5-1.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve5#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve5", - vers = "0.1")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve5-2.rs b/src/test/auxiliary/crateresolve5-2.rs index d0164d77e6652..9c5720680ed6a 100644 --- a/src/test/auxiliary/crateresolve5-2.rs +++ b/src/test/auxiliary/crateresolve5-2.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="crateresolve5#0.2"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve5", - vers = "0.2")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/crateresolve8-1.rs b/src/test/auxiliary/crateresolve8-1.rs index aa3babea58f26..b28ac5295a6d5 100644 --- a/src/test/auxiliary/crateresolve8-1.rs +++ b/src/test/auxiliary/crateresolve8-1.rs @@ -10,9 +10,6 @@ // default link meta for 'package_id' will be equal to filestem #[crate_id="crateresolve8#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve8", - vers = "0.1")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/extern-crosscrate-source.rs b/src/test/auxiliary/extern-crosscrate-source.rs index 7a7d0c453a71e..72345022282bf 100644 --- a/src/test/auxiliary/extern-crosscrate-source.rs +++ b/src/test/auxiliary/extern-crosscrate-source.rs @@ -9,10 +9,6 @@ // except according to those terms. #[crate_id="externcallback#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "externcallback", - vers = "0.1")]; - #[crate_type = "lib"]; use std::libc; diff --git a/src/test/auxiliary/foreign_lib.rs b/src/test/auxiliary/foreign_lib.rs index bc2ef7262a6fa..e59fae346368b 100644 --- a/src/test/auxiliary/foreign_lib.rs +++ b/src/test/auxiliary/foreign_lib.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="foreign_lib"]; -// NOTE: remove after the next snapshot -#[link(name="foreign_lib", vers="0.0")]; pub mod rustrt { use std::libc; diff --git a/src/test/auxiliary/inline_dtor.rs b/src/test/auxiliary/inline_dtor.rs index 83f2cee0a5435..3dc1b4cc2371d 100644 --- a/src/test/auxiliary/inline_dtor.rs +++ b/src/test/auxiliary/inline_dtor.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="inline_dtor#0.1"]; -// NOTE: remove after the next snapshot -#[link(name="inline_dtor", vers="0.1")]; pub struct Foo; diff --git a/src/test/auxiliary/iss.rs b/src/test/auxiliary/iss.rs index b7cffa4c37828..85847a6fdeb28 100644 --- a/src/test/auxiliary/iss.rs +++ b/src/test/auxiliary/iss.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="issue6919_3#0.1"]; -// NOTE: remove after the next snapshot -#[link(name="iss6919_3", vers="0.1")]; // part of issue-6919.rs diff --git a/src/test/auxiliary/issue-2380.rs b/src/test/auxiliary/issue-2380.rs index 24c8edbc80078..c7ffa4a39ac40 100644 --- a/src/test/auxiliary/issue-2380.rs +++ b/src/test/auxiliary/issue-2380.rs @@ -10,8 +10,6 @@ #[feature(managed_boxes)]; #[crate_id="a"]; -// NOTE: remove after the next snapshot -#[link(name = "a", vers = "0.0")]; #[crate_type = "lib"]; pub trait i { } diff --git a/src/test/auxiliary/issue-2414-a.rs b/src/test/auxiliary/issue-2414-a.rs index c9779a0040d78..305dece1ae19b 100644 --- a/src/test/auxiliary/issue-2414-a.rs +++ b/src/test/auxiliary/issue-2414-a.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="a#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "a", vers = "0.1")]; #[crate_type = "lib"]; type t1 = uint; diff --git a/src/test/auxiliary/issue-2414-b.rs b/src/test/auxiliary/issue-2414-b.rs index 33cb5d5fb6c4b..e51d68049eee5 100644 --- a/src/test/auxiliary/issue-2414-b.rs +++ b/src/test/auxiliary/issue-2414-b.rs @@ -11,8 +11,6 @@ // xfail-fast #[crate_id="b#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "b", vers = "0.1")]; #[crate_type = "lib"]; extern mod a; diff --git a/src/test/auxiliary/issue-2526.rs b/src/test/auxiliary/issue-2526.rs index 5948a4923053b..e932a9c29ea6a 100644 --- a/src/test/auxiliary/issue-2526.rs +++ b/src/test/auxiliary/issue-2526.rs @@ -9,10 +9,6 @@ // except according to those terms. #[crate_id="issue_2526#0.2"]; -// NOTE: remove after the next snapshot -#[link(name = "issue_2526", - vers = "0.2", - uuid = "54cc1bc9-02b8-447c-a227-75ebc923bc29")]; #[crate_type = "lib"]; extern mod extra; diff --git a/src/test/auxiliary/issue-2631-a.rs b/src/test/auxiliary/issue-2631-a.rs index e5457e46d33dc..f5d2fb9ffd228 100644 --- a/src/test/auxiliary/issue-2631-a.rs +++ b/src/test/auxiliary/issue-2631-a.rs @@ -10,8 +10,6 @@ #[feature(managed_boxes)]; #[crate_id="req"]; -// NOTE: remove after the next snapshot -#[link(name = "req")]; #[crate_type = "lib"]; extern mod extra; diff --git a/src/test/auxiliary/issue-3012-1.rs b/src/test/auxiliary/issue-3012-1.rs index 40ae334ef7227..af83c5561db8e 100644 --- a/src/test/auxiliary/issue-3012-1.rs +++ b/src/test/auxiliary/issue-3012-1.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="socketlib"]; -// NOTE: remove after the next snapshot -#[link(name="socketlib", vers="0.0")]; #[crate_type = "lib"]; pub mod socket { diff --git a/src/test/auxiliary/issue-4208-cc.rs b/src/test/auxiliary/issue-4208-cc.rs index 71db81459b0dc..8a95f3effb615 100644 --- a/src/test/auxiliary/issue-4208-cc.rs +++ b/src/test/auxiliary/issue-4208-cc.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="numeric#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "numeric", - vers = "0.1")]; #[crate_type = "lib"]; pub trait Trig { diff --git a/src/test/auxiliary/issue2378a.rs b/src/test/auxiliary/issue2378a.rs index ea14229cc48a7..d254a275ea622 100644 --- a/src/test/auxiliary/issue2378a.rs +++ b/src/test/auxiliary/issue2378a.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[link (name = "issue2378a")]; #[crate_type = "lib"]; pub enum maybe { just(T), nothing } diff --git a/src/test/auxiliary/issue2378b.rs b/src/test/auxiliary/issue2378b.rs index 71c0bab138f46..2931245bb12bd 100644 --- a/src/test/auxiliary/issue2378b.rs +++ b/src/test/auxiliary/issue2378b.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[link (name = "issue2378b")]; #[crate_type = "lib"]; extern mod issue2378a; diff --git a/src/test/auxiliary/issue_2242_a.rs b/src/test/auxiliary/issue_2242_a.rs index 4d21abe64efe1..413d57c6fd408 100644 --- a/src/test/auxiliary/issue_2242_a.rs +++ b/src/test/auxiliary/issue_2242_a.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="a#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "a", vers = "0.1")]; #[crate_type = "lib"]; trait to_strz { diff --git a/src/test/auxiliary/issue_2242_c.rs b/src/test/auxiliary/issue_2242_c.rs index 60054cd22189a..4008402441b5d 100644 --- a/src/test/auxiliary/issue_2242_c.rs +++ b/src/test/auxiliary/issue_2242_c.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="c#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "c", vers = "0.1")]; #[crate_type = "lib"]; extern mod a; diff --git a/src/test/auxiliary/issue_3979_traits.rs b/src/test/auxiliary/issue_3979_traits.rs index 08f83d9d20624..75bdad7c95ee2 100644 --- a/src/test/auxiliary/issue_3979_traits.rs +++ b/src/test/auxiliary/issue_3979_traits.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="issue_3979_traits#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "issue_3979_traits", - vers = "0.1")]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/lint_stability.rs b/src/test/auxiliary/lint_stability.rs index 8b821c656228a..108b715c0fb65 100644 --- a/src/test/auxiliary/lint_stability.rs +++ b/src/test/auxiliary/lint_stability.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. #[crate_id="lint_stability#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "lint_stability", - vers = "0.1")]; #[crate_type = "lib"]; #[deprecated] diff --git a/src/test/auxiliary/static-methods-crate.rs b/src/test/auxiliary/static-methods-crate.rs index 648c9ca7320fe..bc028f972db9d 100644 --- a/src/test/auxiliary/static-methods-crate.rs +++ b/src/test/auxiliary/static-methods-crate.rs @@ -9,10 +9,6 @@ // except according to those terms. #[crate_id="static_methods_crate#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "static_methods_crate", - vers = "0.1")]; - #[crate_type = "lib"]; use std::int; diff --git a/src/test/auxiliary/struct_variant_xc_aux.rs b/src/test/auxiliary/struct_variant_xc_aux.rs index fc258a8a52794..668e5c9afb352 100644 --- a/src/test/auxiliary/struct_variant_xc_aux.rs +++ b/src/test/auxiliary/struct_variant_xc_aux.rs @@ -9,9 +9,6 @@ // except according to those terms. #[crate_id="struct_variant_xc_aux#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "struct_variant_xc_aux", - vers = "0.1")]; #[crate_type = "lib"]; #[feature(struct_variant)]; diff --git a/src/test/run-pass/issue-1251.rs b/src/test/run-pass/issue-1251.rs index 27ea0d394b883..70d2c58a631e3 100644 --- a/src/test/run-pass/issue-1251.rs +++ b/src/test/run-pass/issue-1251.rs @@ -9,8 +9,6 @@ // except according to those terms. #[crate_id="rust_get_test_int"]; -// NOTE: remove after the next snapshot -#[link(name = "rust_get_test_int")]; mod rustrt { use std::libc; diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs index b453dca1800c6..133660e28d2ac 100644 --- a/src/test/run-pass/item-attributes.rs +++ b/src/test/run-pass/item-attributes.rs @@ -17,12 +17,6 @@ #[attr4(attr5)]; #[crate_id="extra#0.1"]; -// NOTE: remove after the next snapshot -// Special linkage attributes for the crate -#[link(name = "extra", - vers = "0.1", - uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297", - url = "http://rust-lang.org/src/extra")]; // These are attributes of the following mod #[attr1 = "val"]