Skip to content

Commit e09a8e8

Browse files
committed
auto merge of #11091 : brson/rust/cratelinkattr, r=brson
This is set to *forbid* and prints a note explaining how to fix the problem.
2 parents 619c4fc + 26f1b4d commit e09a8e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+6
-104
lines changed

src/etc/combine-tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def scrub(b):
4646
// AUTO-GENERATED FILE: DO NOT EDIT
4747
#[crate_id=\"run_pass_stage2#0.1\"];
4848
#[pkgid=\"run_pass_stage2#0.1\"];
49-
#[link(name=\"run_pass_stage2\", vers=\"0.1\")];
5049
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
5150
#[allow(warnings)];
5251
"""

src/librustc/middle/lint.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,12 @@ fn check_crate_attrs_usage(cx: &Context, attrs: &[ast::Attribute]) {
872872
if !iter.any(|other_attr| { name.equiv(other_attr) }) {
873873
cx.span_lint(attribute_usage, attr.span, "unknown crate attribute");
874874
}
875+
if name.equiv(& &"link") {
876+
cx.tcx.sess.span_err(attr.span,
877+
"obsolete crate `link` attribute");
878+
cx.tcx.sess.note("the link attribute has been superceded by the crate_id \
879+
attribute, which has the format `#[crate_id = \"name#version\"]`");
880+
}
875881
}
876882
}
877883

src/test/auxiliary/cci_impl_lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="cci_impl_lib"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name="cci_impl_lib", vers="0.0")];
1412

1513
trait uint_helpers {
1614
fn to(&self, v: uint, f: |uint|);

src/test/auxiliary/cci_iter_lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="cci_iter_lib"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name="cci_iter_lib", vers="0.0")];
1412

1513
#[inline]
1614
pub fn iter<T>(v: &[T], f: |&T|) {

src/test/auxiliary/cci_no_inline_lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="cci_no_inline_lib"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name="cci_no_inline_lib", vers="0.0")];
1412

1513
// same as cci_iter_lib, more-or-less, but not marked inline
1614
pub fn iter(v: ~[uint], f: |uint|) {

src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
#[feature(managed_boxes)];
1212
#[crate_id="crate_method_reexport_grrrrrrr2"];
13-
// NOTE: remove after the next snapshot
14-
#[link(name = "crate_method_reexport_grrrrrrr2")];
1513

1614
pub use name_pool::add;
1715

src/test/auxiliary/crateresolve1-1.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve1#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve1",
14-
vers = "0.1")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve1-2.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve1#0.2"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve1",
14-
vers = "0.2")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve1-3.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve1#0.3"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve1",
14-
vers = "0.3")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve2-1.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve2#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve2",
14-
vers = "0.1")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve2-2.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve2#0.2"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve2",
14-
vers = "0.2")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve2-3.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve2#0.3"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve2",
14-
vers = "0.3")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve3-1.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve3#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve3",
14-
vers = "0.1")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve3-2.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve3#0.2"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve3",
14-
vers = "0.2")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve4a-1.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve4a#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve4a", vers = "0.1")];
1412
#[crate_type = "lib"];
1513

1614
pub fn f() -> int { 10 }

src/test/auxiliary/crateresolve4a-2.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve4a#0.2"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve4a", vers= "0.2")];
1412
#[crate_type = "lib"];
1513

1614
pub fn g() -> int { 20 }

src/test/auxiliary/crateresolve4b-1.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// aux-build:crateresolve4a-1.rs
1212
// aux-build:crateresolve4a-2.rs
1313
#[crate_id="crateresolve4b#0.1"];
14-
// NOTE: remove after the next snapshot
15-
#[link(name = "crateresolve4b", vers = "0.1")];
1614
#[crate_type = "lib"];
1715

1816
extern mod crateresolve4a = "crateresolve4a#0.2";

src/test/auxiliary/crateresolve4b-2.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// aux-build:crateresolve4a-1.rs
1212
// aux-build:crateresolve4a-2.rs
1313
#[crate_id="crateresolve4b#0.2"];
14-
// NOTE: remove after the next snapshot
15-
#[link(name = "crateresolve4b", vers = "0.2")];
1614
#[crate_type = "lib"];
1715

1816
extern mod crateresolve4a = "crateresolve4a#0.1";

src/test/auxiliary/crateresolve5-1.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve5#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve5",
14-
vers = "0.1")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve5-2.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="crateresolve5#0.2"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "crateresolve5",
14-
vers = "0.2")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/crateresolve8-1.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
// default link meta for 'package_id' will be equal to filestem
1212
#[crate_id="crateresolve8#0.1"];
13-
// NOTE: remove after the next snapshot
14-
#[link(name = "crateresolve8",
15-
vers = "0.1")];
1613

1714
#[crate_type = "lib"];
1815

src/test/auxiliary/extern-crosscrate-source.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="externcallback#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "externcallback",
14-
vers = "0.1")];
15-
1612
#[crate_type = "lib"];
1713

1814
use std::libc;

src/test/auxiliary/foreign_lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="foreign_lib"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name="foreign_lib", vers="0.0")];
1412

1513
pub mod rustrt {
1614
use std::libc;

src/test/auxiliary/inline_dtor.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="inline_dtor#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name="inline_dtor", vers="0.1")];
1412

1513
pub struct Foo;
1614

src/test/auxiliary/iss.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="issue6919_3#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name="iss6919_3", vers="0.1")];
1412

1513
// part of issue-6919.rs
1614

src/test/auxiliary/issue-2380.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
#[feature(managed_boxes)];
1212
#[crate_id="a"];
13-
// NOTE: remove after the next snapshot
14-
#[link(name = "a", vers = "0.0")];
1513
#[crate_type = "lib"];
1614

1715
pub trait i<T> { }

src/test/auxiliary/issue-2414-a.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="a#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "a", vers = "0.1")];
1412
#[crate_type = "lib"];
1513

1614
type t1 = uint;

src/test/auxiliary/issue-2414-b.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// xfail-fast
1212

1313
#[crate_id="b#0.1"];
14-
// NOTE: remove after the next snapshot
15-
#[link(name = "b", vers = "0.1")];
1614
#[crate_type = "lib"];
1715

1816
extern mod a;

src/test/auxiliary/issue-2526.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="issue_2526#0.2"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "issue_2526",
14-
vers = "0.2",
15-
uuid = "54cc1bc9-02b8-447c-a227-75ebc923bc29")];
1612
#[crate_type = "lib"];
1713

1814
extern mod extra;

src/test/auxiliary/issue-2631-a.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
#[feature(managed_boxes)];
1212
#[crate_id="req"];
13-
// NOTE: remove after the next snapshot
14-
#[link(name = "req")];
1513
#[crate_type = "lib"];
1614

1715
extern mod extra;

src/test/auxiliary/issue-3012-1.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="socketlib"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name="socketlib", vers="0.0")];
1412
#[crate_type = "lib"];
1513

1614
pub mod socket {

src/test/auxiliary/issue-4208-cc.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="numeric#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "numeric",
14-
vers = "0.1")];
1512
#[crate_type = "lib"];
1613

1714
pub trait Trig<T> {

src/test/auxiliary/issue2378a.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[link (name = "issue2378a")];
1211
#[crate_type = "lib"];
1312

1413
pub enum maybe<T> { just(T), nothing }

src/test/auxiliary/issue2378b.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[link (name = "issue2378b")];
1211
#[crate_type = "lib"];
1312

1413
extern mod issue2378a;

src/test/auxiliary/issue_2242_a.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="a#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "a", vers = "0.1")];
1412
#[crate_type = "lib"];
1513

1614
trait to_strz {

src/test/auxiliary/issue_2242_c.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="c#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "c", vers = "0.1")];
1412
#[crate_type = "lib"];
1513

1614
extern mod a;

src/test/auxiliary/issue_3979_traits.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="issue_3979_traits#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "issue_3979_traits",
14-
vers = "0.1")];
1512

1613
#[crate_type = "lib"];
1714

src/test/auxiliary/lint_stability.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010
#[crate_id="lint_stability#0.1"];
11-
// NOTE: remove after the next snapshot
12-
#[link(name = "lint_stability",
13-
vers = "0.1")];
1411
#[crate_type = "lib"];
1512

1613
#[deprecated]

src/test/auxiliary/static-methods-crate.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="static_methods_crate#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "static_methods_crate",
14-
vers = "0.1")];
15-
1612
#[crate_type = "lib"];
1713

1814
use std::int;

src/test/auxiliary/struct_variant_xc_aux.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="struct_variant_xc_aux#0.1"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "struct_variant_xc_aux",
14-
vers = "0.1")];
1512
#[crate_type = "lib"];
1613

1714
#[feature(struct_variant)];

src/test/run-pass/issue-1251.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#[crate_id="rust_get_test_int"];
12-
// NOTE: remove after the next snapshot
13-
#[link(name = "rust_get_test_int")];
1412

1513
mod rustrt {
1614
use std::libc;

0 commit comments

Comments
 (0)