Skip to content

Commit 1bdf7f2

Browse files
committed
---
yaml --- r: 40556 b: refs/heads/dist-snap c: fc06114 h: refs/heads/master v: v3
1 parent 574f7fd commit 1bdf7f2

Some content is hidden

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

63 files changed

+1391
-188
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: 8179e268efd86ae5c1bcf21b4f8d4e01eea7c193
10+
refs/heads/dist-snap: fc06114ddfd2bcdbc4f29076c226a7a1d66ea8d6
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/compiletest/compiletest.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ fn parse_config(args: ~[~str]) -> config {
6363
assert (vec::is_not_empty(args));
6464
let args_ = vec::tail(args);
6565
let matches =
66-
match getopts::getopts(args_, opts) {
66+
&match getopts::getopts(args_, opts) {
6767
Ok(m) => m,
6868
Err(f) => fail getopts::fail_str(f)
6969
};
7070

71-
fn opt_path(m: getopts::Matches, nm: ~str) -> Path {
71+
fn opt_path(m: &getopts::Matches, nm: ~str) -> Path {
7272
Path(getopts::opt_str(m, nm))
7373
}
7474

branches/dist-snap/src/libcargo/cargo.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ fn load_source_packages(c: &Cargo, src: @Source) {
655655
}
656656

657657
fn build_cargo_options(argv: ~[~str]) -> Options {
658-
let matches = match getopts::getopts(argv, opts()) {
658+
let matches = &match getopts::getopts(argv, opts()) {
659659
result::Ok(m) => m,
660660
result::Err(f) => {
661661
fail fmt!("%s", getopts::fail_str(f));
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
Clonable types are copied with the clone method
3+
*/
4+
pub trait Clone {
5+
fn clone(&self) -> self;
6+
}
7+
8+
impl (): Clone {
9+
fn clone(&self) -> () { () }
10+
}

branches/dist-snap/src/libcore/core.rc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ pub mod to_str;
128128
pub mod to_bytes;
129129
pub mod from_str;
130130
pub mod util;
131+
pub mod clone;
131132

132133
// Data structure modules
133134

@@ -232,6 +233,10 @@ pub use coreops::ops::{BitXor};
232233
#[cfg(test)]
233234
pub use coreops::ops::{Shl, Shr, Index};
234235

236+
#[cfg(notest)]
237+
pub use clone::Clone;
238+
#[cfg(test)]
239+
pub use coreops::clone::Clone;
235240

236241
// Export the log levels as global constants. Higher levels mean
237242
// more-verbosity. Error is the bottom level, default logging level is

branches/dist-snap/src/libcore/ops.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,52 +35,52 @@ pub trait Add<RHS,Result> {
3535

3636
#[lang="sub"]
3737
pub trait Sub<RHS,Result> {
38-
pure fn sub(rhs: &RHS) -> Result;
38+
pure fn sub(&self, rhs: &RHS) -> Result;
3939
}
4040

4141
#[lang="mul"]
4242
pub trait Mul<RHS,Result> {
43-
pure fn mul(rhs: &RHS) -> Result;
43+
pure fn mul(&self, rhs: &RHS) -> Result;
4444
}
4545

4646
#[lang="div"]
4747
pub trait Div<RHS,Result> {
48-
pure fn div(rhs: &RHS) -> Result;
48+
pure fn div(&self, rhs: &RHS) -> Result;
4949
}
5050

5151
#[lang="modulo"]
5252
pub trait Modulo<RHS,Result> {
53-
pure fn modulo(rhs: &RHS) -> Result;
53+
pure fn modulo(&self, rhs: &RHS) -> Result;
5454
}
5555

5656
#[lang="neg"]
5757
pub trait Neg<Result> {
58-
pure fn neg() -> Result;
58+
pure fn neg(&self) -> Result;
5959
}
6060

6161
#[lang="bitand"]
6262
pub trait BitAnd<RHS,Result> {
63-
pure fn bitand(rhs: &RHS) -> Result;
63+
pure fn bitand(&self, rhs: &RHS) -> Result;
6464
}
6565

6666
#[lang="bitor"]
6767
pub trait BitOr<RHS,Result> {
68-
pure fn bitor(rhs: &RHS) -> Result;
68+
pure fn bitor(&self, rhs: &RHS) -> Result;
6969
}
7070

7171
#[lang="bitxor"]
7272
pub trait BitXor<RHS,Result> {
73-
pure fn bitxor(rhs: &RHS) -> Result;
73+
pure fn bitxor(&self, rhs: &RHS) -> Result;
7474
}
7575

7676
#[lang="shl"]
7777
pub trait Shl<RHS,Result> {
78-
pure fn shl(rhs: &RHS) -> Result;
78+
pure fn shl(&self, rhs: &RHS) -> Result;
7979
}
8080

8181
#[lang="shr"]
8282
pub trait Shr<RHS,Result> {
83-
pure fn shr(rhs: &RHS) -> Result;
83+
pure fn shr(&self, rhs: &RHS) -> Result;
8484
}
8585

8686
#[lang="index"]

branches/dist-snap/src/libcore/private.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,12 +509,14 @@ pub fn exclusive<T:Send >(user_data: T) -> Exclusive<T> {
509509
Exclusive { x: unsafe { shared_mutable_state(move data) } }
510510
}
511511

512-
impl<T: Send> Exclusive<T> {
512+
impl<T: Send> Exclusive<T>: Clone {
513513
// Duplicate an exclusive ARC, as std::arc::clone.
514-
fn clone() -> Exclusive<T> {
514+
fn clone(&self) -> Exclusive<T> {
515515
Exclusive { x: unsafe { clone_shared_mutable_state(&self.x) } }
516516
}
517+
}
517518

519+
impl<T: Send> Exclusive<T> {
518520
// Exactly like std::arc::mutex_arc,access(), but with the little_lock
519521
// instead of a proper mutex. Same reason for being unsafe.
520522
//

branches/dist-snap/src/libcore/rt.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ extern mod rustrt {
3434
// 'rt_', otherwise the compiler won't find it. To fix this, see
3535
// gather_rust_rtcalls.
3636
#[rt(fail_)]
37-
pub fn rt_fail_(expr: *c_char, file: *c_char, line: size_t) {
38-
cleanup_stack_for_failure();
39-
rustrt::rust_upcall_fail(expr, file, line);
37+
pub fn rt_fail_(expr: *c_char, file: *c_char, line: size_t) -> ! {
38+
unsafe {
39+
cleanup_stack_for_failure();
40+
rustrt::rust_upcall_fail(expr, file, line);
41+
cast::transmute(())
42+
}
4043
}
4144

4245
#[rt(fail_bounds_check)]

0 commit comments

Comments
 (0)