Skip to content

Commit 9b21bb7

Browse files
committed
---
yaml --- r: 95958 b: refs/heads/dist-snap c: b60de8a h: refs/heads/master v: v3
1 parent 1a8e67b commit 9b21bb7

File tree

17 files changed

+31
-209
lines changed

17 files changed

+31
-209
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 4f68d1365abc71d0b63c7167c6a4625104912af2
9+
refs/heads/dist-snap: b60de8a1f6fe343f99203036e39ec82c3c6fd1b9
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libextra/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Rust extras are part of the standard Rust distribution.
2121
*/
2222

2323
#[link(name = "extra",
24-
package_id = "extra",
2524
vers = "0.9-pre",
2625
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
2726
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];

branches/dist-snap/src/librustc/back/link.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -634,18 +634,6 @@ pub fn build_link_meta(sess: Session,
634634
}
635635
}
636636

637-
fn crate_meta_pkgid(sess: Session, name: @str, opt_pkg_id: Option<@str>)
638-
-> @str {
639-
match opt_pkg_id {
640-
Some(v) if !v.is_empty() => v,
641-
_ => {
642-
let pkg_id = name.clone();
643-
warn_missing(sess, "package_id", pkg_id);
644-
pkg_id
645-
}
646-
}
647-
}
648-
649637
let ProvidedMetas {
650638
name: opt_name,
651639
vers: opt_vers,
@@ -654,16 +642,15 @@ pub fn build_link_meta(sess: Session,
654642
} = provided_link_metas(sess, c);
655643
let name = crate_meta_name(sess, output, opt_name);
656644
let vers = crate_meta_vers(sess, opt_vers);
657-
let pkg_id = crate_meta_pkgid(sess, name, opt_pkg_id);
658645
let dep_hashes = cstore::get_dep_hashes(sess.cstore);
659646
let extras_hash =
660647
crate_meta_extras_hash(symbol_hasher, cmh_items,
661-
dep_hashes, Some(pkg_id));
648+
dep_hashes, opt_pkg_id);
662649

663650
LinkMeta {
664651
name: name,
665652
vers: vers,
666-
package_id: Some(pkg_id),
653+
package_id: opt_pkg_id,
667654
extras_hash: extras_hash
668655
}
669656
}

branches/dist-snap/src/librustc/lib.rs

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

1111
#[link(name = "rustc",
12-
package_id = "rustc",
1312
vers = "0.9-pre",
1413
uuid = "0ce89b41-2f92-459e-bbc1-8f5fe32f16cf",
1514
url = "https://github.com/mozilla/rust/tree/master/src/rustc")];

branches/dist-snap/src/librustc/metadata/encoder.rs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,8 +1487,8 @@ fn encode_attributes(ebml_w: &mut writer::Encoder, attrs: &[Attribute]) {
14871487

14881488
// So there's a special crate attribute called 'link' which defines the
14891489
// metadata that Rust cares about for linking crates. This attribute requires
1490-
// 'name', 'vers' and 'package_id' items, so if the user didn't provide them we
1491-
// will throw them in anyway with default values.
1490+
// 'name' and 'vers' items, so if the user didn't provide them we will throw
1491+
// them in anyway with default values.
14921492
fn synthesize_crate_attrs(ecx: &EncodeContext,
14931493
crate: &Crate) -> ~[Attribute] {
14941494

@@ -1505,20 +1505,9 @@ fn synthesize_crate_attrs(ecx: &EncodeContext,
15051505
attr::mk_name_value_item_str(@"vers",
15061506
ecx.link_meta.vers);
15071507

1508-
let pkgid_item = match ecx.link_meta.package_id {
1509-
Some(pkg_id) => attr::mk_name_value_item_str(@"package_id",
1510-
pkg_id),
1511-
// uses package_id equal to name;
1512-
// this should never happen here but package_id is an Option
1513-
// FIXME (#10370): change package_id in LinkMeta to @str instead of Option<@str>
1514-
_ => attr::mk_name_value_item_str(@"package_id",
1515-
ecx.link_meta.name)
1516-
};
1517-
1518-
let mut meta_items = ~[name_item, vers_item, pkgid_item];
1508+
let mut meta_items = ~[name_item, vers_item];
15191509

1520-
for &mi in items.iter().filter(|mi| "name" != mi.name() && "vers" != mi.name() &&
1521-
"package_id" != mi.name()) {
1510+
for &mi in items.iter().filter(|mi| "name" != mi.name() && "vers" != mi.name()) {
15221511
meta_items.push(mi);
15231512
}
15241513
let link_item = attr::mk_list_item(@"link", meta_items);

branches/dist-snap/src/librustdoc/lib.rs

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

1111
#[link(name = "rustdoc",
12-
package_id = "rustdoc",
1312
vers = "0.9-pre",
1413
uuid = "8c6e4598-1596-4aa5-a24c-b811914bbbc6",
1514
url = "https://github.com/mozilla/rust/tree/master/src/librustdoc")];

branches/dist-snap/src/librustpkg/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// rustpkg - a package manager and build system for Rust
1212

1313
#[link(name = "rustpkg",
14-
package_id = "rustpkg",
1514
vers = "0.9-pre",
1615
uuid = "25de5e6e-279e-4a20-845c-4cabae92daaf",
1716
url = "https://github.com/mozilla/rust/tree/master/src/librustpkg")];

branches/dist-snap/src/librustpkg/tests.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,24 @@ fn no_rebuilding() {
10961096
}
10971097
}
10981098
1099+
#[test]
1100+
fn no_recopying() {
1101+
let p_id = PkgId::new("foo");
1102+
let workspace = create_local_package(&p_id);
1103+
let workspace = workspace.path();
1104+
command_line_test([~"install", ~"foo"], workspace);
1105+
let foo_lib = installed_library_in_workspace(&p_id.path, workspace);
1106+
assert!(foo_lib.is_some());
1107+
// Now make `foo` read-only so that subsequent attempts to copy to it will fail
1108+
assert!(chmod_read_only(&foo_lib.unwrap()));
1109+
1110+
match command_line_test_partial([~"install", ~"foo"], workspace) {
1111+
Success(*) => (), // ok
1112+
Fail(65) => fail!("no_recopying failed: it tried to re-copy foo"),
1113+
Fail(_) => fail!("no_copying failed for some other reason")
1114+
}
1115+
}
1116+
10991117
#[test]
11001118
fn no_rebuilding_dep() {
11011119
let p_id = PkgId::new("foo");

branches/dist-snap/src/librustuv/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ via `close` and `delete` methods.
3535
*/
3636

3737
#[link(name = "rustuv",
38-
package_id = "rustuv",
3938
vers = "0.9-pre",
4039
uuid = "f3719011-0459-9b86-b11c-29265c0d0864",
4140
url = "https://github.com/mozilla/rust/tree/master/src/librustuv")];

branches/dist-snap/src/libstd/any.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use cast::transmute;
1515
use cmp::Eq;
1616
use option::{Option, Some, None};
17-
use to_bytes::{IterBytes, Cb};
1817
use to_str::ToStr;
1918
use unstable::intrinsics;
2019
use util::Void;
@@ -43,12 +42,6 @@ impl Eq for TypeId {
4342
}
4443
}
4544

46-
impl IterBytes for TypeId {
47-
fn iter_bytes(&self, lsb0: bool, f: Cb) -> bool {
48-
self.t.iter_bytes(lsb0, f)
49-
}
50-
}
51-
5245
///////////////////////////////////////////////////////////////////////////////
5346
// Any trait
5447
///////////////////////////////////////////////////////////////////////////////
@@ -182,7 +175,6 @@ mod tests {
182175
use super::*;
183176
use super::AnyRefExt;
184177
use option::{Some, None};
185-
use hash::Hash;
186178

187179
#[deriving(Eq)]
188180
struct Test;
@@ -205,13 +197,6 @@ mod tests {
205197
assert_eq!(c, f);
206198
}
207199

208-
#[test]
209-
fn type_id_hash() {
210-
let (a, b) = (TypeId::of::<uint>(), TypeId::of::<uint>::());
211-
212-
assert_eq!(a.hash(), b.hash());
213-
}
214-
215200
#[test]
216201
fn any_as_void_ptr() {
217202
let (a, b, c) = (~5u as ~Any, ~TEST as ~Any, ~Test as ~Any);

branches/dist-snap/src/libstd/clone.rs

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,12 @@ pub trait Clone {
2929
/// are copied to maintain uniqueness, while the contents of
3030
/// managed pointers are not copied.
3131
fn clone(&self) -> Self;
32-
33-
/// Perform copy-assignment from `source`.
34-
///
35-
/// `a.clone_from(&b)` is equivalent to `a = b.clone()` in functionality,
36-
/// but can be overriden to reuse the resources of `a` to avoid unnecessary
37-
/// allocations.
38-
#[inline(always)]
39-
fn clone_from(&mut self, source: &Self) {
40-
*self = source.clone()
41-
}
4232
}
4333

4434
impl<T: Clone> Clone for ~T {
45-
/// Return a copy of the owned box.
35+
/// Return a deep copy of the owned box.
4636
#[inline]
4737
fn clone(&self) -> ~T { ~(**self).clone() }
48-
49-
/// Perform copy-assignment from `source` by reusing the existing allocation.
50-
fn clone_from(&mut self, source: &~T) {
51-
**self = (**source).clone()
52-
}
5338
}
5439

5540
impl<T> Clone for @T {
@@ -133,31 +118,16 @@ extern_fn_clone!(A, B, C, D, E, F, G, H)
133118

134119
/// A trait distinct from `Clone` which represents "deep copies" of things like
135120
/// managed boxes which would otherwise not be copied.
136-
pub trait DeepClone: Clone {
121+
pub trait DeepClone {
137122
/// Return a deep copy of the value. Unlike `Clone`, the contents of shared pointer types
138123
/// *are* copied.
139124
fn deep_clone(&self) -> Self;
140-
141-
/// Perform deep copy-assignment from `source`.
142-
///
143-
/// `a.deep_clone_from(&b)` is equivalent to `a = b.deep_clone()` in
144-
/// functionality, but can be overriden to reuse the resources of `a` to
145-
/// avoid unnecessary allocations.
146-
#[inline(always)]
147-
fn deep_clone_from(&mut self, source: &Self) {
148-
*self = source.deep_clone()
149-
}
150125
}
151126

152127
impl<T: DeepClone> DeepClone for ~T {
153128
/// Return a deep copy of the owned box.
154129
#[inline]
155130
fn deep_clone(&self) -> ~T { ~(**self).deep_clone() }
156-
157-
/// Perform deep copy-assignment from `source` by reusing the existing allocation.
158-
fn deep_clone_from(&mut self, source: &~T) {
159-
**self = (**source).deep_clone()
160-
}
161131
}
162132

163133
// FIXME: #6525: should also be implemented for `T: Send + DeepClone`
@@ -264,22 +234,6 @@ fn test_borrowed_clone() {
264234
assert_eq!(*z, 5);
265235
}
266236

267-
#[test]
268-
fn test_clone_from() {
269-
let a = ~5;
270-
let mut b = ~10;
271-
b.clone_from(&a);
272-
assert_eq!(*b, 5);
273-
}
274-
275-
#[test]
276-
fn test_deep_clone_from() {
277-
let a = ~5;
278-
let mut b = ~10;
279-
b.deep_clone_from(&a);
280-
assert_eq!(*b, 5);
281-
}
282-
283237
#[test]
284238
fn test_extern_fn_clone() {
285239
trait Empty {}

branches/dist-snap/src/libstd/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
//! use std::prelude::*;
4545
4646
#[link(name = "std",
47-
package_id = "std",
4847
vers = "0.9-pre",
4948
uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
5049
url = "https://github.com/mozilla/rust/tree/master/src/libstd")];

0 commit comments

Comments
 (0)