Skip to content

Commit 18d1639

Browse files
committed
---
yaml --- r: 147434 b: refs/heads/try2 c: 41cbbb6 h: refs/heads/master v: v3
1 parent 8b0ef9f commit 18d1639

Some content is hidden

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

44 files changed

+122
-7
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: e09a8e892346ddcb917b74f0c5c678a5b477f609
8+
refs/heads/try2: 41cbbb656a9d29305fd03fb09d261cbfa0766f7a
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/etc/combine-tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ 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\")];
4950
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
5051
#[allow(warnings)];
5152
"""

branches/try2/src/libextra/uuid.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ use std::rand;
6565
use std::rand::Rng;
6666
use std::cmp::Eq;
6767
use std::cast::{transmute,transmute_copy};
68+
use std::to_bytes::{IterBytes, Cb};
6869

6970
use serialize::{Encoder, Encodable, Decoder, Decodable};
7071

@@ -104,6 +105,11 @@ pub struct Uuid {
104105
/// The 128-bit number stored in 16 bytes
105106
bytes: UuidBytes
106107
}
108+
impl IterBytes for Uuid {
109+
fn iter_bytes(&self, _: bool, f: Cb) -> bool {
110+
f(self.bytes.slice_from(0))
111+
}
112+
}
107113

108114
/// A UUID stored as fields (identical to UUID, used only for conversions)
109115
struct UuidFields {
@@ -796,6 +802,17 @@ mod test {
796802
let u2 = Decodable::decode(&mut ebml::reader::Decoder(doc));
797803
assert_eq!(u, u2);
798804
}
805+
806+
#[test]
807+
fn test_iterbytes_impl_for_uuid() {
808+
use std::hashmap::HashSet;
809+
let mut set = HashSet::new();
810+
let id1 = Uuid::new_v4();
811+
let id2 = Uuid::new_v4();
812+
set.insert(id1);
813+
assert!(set.contains(&id1));
814+
assert!(!set.contains(&id2));
815+
}
799816
}
800817

801818
#[cfg(test)]

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -872,12 +872,6 @@ 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-
}
881875
}
882876
}
883877

branches/try2/src/test/auxiliary/cci_impl_lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214

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

branches/try2/src/test/auxiliary/cci_iter_lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214

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

branches/try2/src/test/auxiliary/cci_no_inline_lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
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")];
1315

1416
pub use name_pool::add;
1517

branches/try2/src/test/auxiliary/crateresolve1-1.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve1-2.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve1-3.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve2-1.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve2-2.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve2-3.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve3-1.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve3-2.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve4a-1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214
#[crate_type = "lib"];
1315

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

branches/try2/src/test/auxiliary/crateresolve4a-2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214
#[crate_type = "lib"];
1315

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

branches/try2/src/test/auxiliary/crateresolve4b-1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
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")];
1416
#[crate_type = "lib"];
1517

1618
extern mod crateresolve4a = "crateresolve4a#0.2";

branches/try2/src/test/auxiliary/crateresolve4b-2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
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")];
1416
#[crate_type = "lib"];
1517

1618
extern mod crateresolve4a = "crateresolve4a#0.1";

branches/try2/src/test/auxiliary/crateresolve5-1.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve5-2.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

branches/try2/src/test/auxiliary/crateresolve8-1.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
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")];
1316

1417
#[crate_type = "lib"];
1518

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
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+
1216
#[crate_type = "lib"];
1317

1418
use std::libc;

branches/try2/src/test/auxiliary/foreign_lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214

1315
pub mod rustrt {
1416
use std::libc;

branches/try2/src/test/auxiliary/inline_dtor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214

1315
pub struct Foo;
1416

branches/try2/src/test/auxiliary/iss.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214

1315
// part of issue-6919.rs
1416

branches/try2/src/test/auxiliary/issue-2380.rs

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

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

1517
pub trait i<T> { }

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214
#[crate_type = "lib"];
1315

1416
type t1 = uint;

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

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

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

1618
extern mod a;

branches/try2/src/test/auxiliary/issue-2526.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
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")];
1216
#[crate_type = "lib"];
1317

1418
extern mod extra;

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

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

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

1517
extern mod extra;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214
#[crate_type = "lib"];
1315

1416
pub mod socket {

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215
#[crate_type = "lib"];
1316

1417
pub trait Trig<T> {

branches/try2/src/test/auxiliary/issue2378a.rs

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

11+
#[link (name = "issue2378a")];
1112
#[crate_type = "lib"];
1213

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

branches/try2/src/test/auxiliary/issue2378b.rs

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

11+
#[link (name = "issue2378b")];
1112
#[crate_type = "lib"];
1213

1314
extern mod issue2378a;

branches/try2/src/test/auxiliary/issue_2242_a.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214
#[crate_type = "lib"];
1315

1416
trait to_strz {

branches/try2/src/test/auxiliary/issue_2242_c.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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")];
1214
#[crate_type = "lib"];
1315

1416
extern mod a;

branches/try2/src/test/auxiliary/issue_3979_traits.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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")];
1215

1316
#[crate_type = "lib"];
1417

0 commit comments

Comments
 (0)