Skip to content

Commit 7b09b1f

Browse files
committed
---
yaml --- r: 56699 b: refs/heads/try c: d6f455e h: refs/heads/master i: 56697: 08db722 56695: e662760 v: v3
1 parent d1075fc commit 7b09b1f

File tree

4 files changed

+16
-39
lines changed

4 files changed

+16
-39
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5-
refs/heads/try: d375171fd44247bff3e355fb82d88b83f14da442
5+
refs/heads/try: d6f455ebca79b6a3d374158a047b1cdd744ebc5e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/clone.rs

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -36,16 +36,6 @@ impl<T:Clone> Clone for ~T {
3636
fn clone(&self) -> ~T { ~(**self).clone() }
3737
}
3838

39-
impl<T:Clone> Clone for @T {
40-
#[inline(always)]
41-
fn clone(&self) -> @T { @(**self).clone() }
42-
}
43-
44-
impl<T:Clone> Clone for @mut T {
45-
#[inline(always)]
46-
fn clone(&self) -> @mut T { @mut (**self).clone() }
47-
}
48-
4939
macro_rules! clone_impl(
5040
($t:ty) => {
5141
impl Clone for $t {
@@ -73,24 +63,3 @@ clone_impl!(f64)
7363

7464
clone_impl!(bool)
7565
clone_impl!(char)
76-
77-
#[test]
78-
fn test_owned_clone() {
79-
let a : ~int = ~5i;
80-
let b : ~int = a.clone();
81-
assert!(a == b);
82-
}
83-
84-
#[test]
85-
fn test_managed_clone() {
86-
let a : @int = @5i;
87-
let b : @int = a.clone();
88-
assert!(a == b);
89-
}
90-
91-
#[test]
92-
fn test_managed_mut_clone() {
93-
let a : @int = @5i;
94-
let b : @int = a.clone();
95-
assert!(a == b);
96-
}

branches/try/src/rustllvm/RustWrapper.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ using namespace llvm::sys;
6262

6363
static const char *LLVMRustError;
6464

65+
extern cl::opt<bool> EnableARMEHABI;
66+
6567
extern "C" LLVMMemoryBufferRef
6668
LLVMRustCreateMemoryBufferWithContentsOfFile(const char *Path) {
6769
LLVMMemoryBufferRef MemBuf = NULL;
@@ -429,10 +431,16 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
429431

430432
LLVMRustInitializeTargets();
431433

432-
int argc = 3;
433-
const char* argv[] = {"rustc", "-arm-enable-ehabi",
434-
"-arm-enable-ehabi-descriptors"};
435-
cl::ParseCommandLineOptions(argc, argv);
434+
// Initializing the command-line options more than once is not
435+
// allowed. So, check if they've already been initialized.
436+
// (This could happen if we're being called from rustpkg, for
437+
// example.)
438+
if (!EnableARMEHABI) {
439+
int argc = 3;
440+
const char* argv[] = {"rustc", "-arm-enable-ehabi",
441+
"-arm-enable-ehabi-descriptors"};
442+
cl::ParseCommandLineOptions(argc, argv);
443+
}
436444

437445
TargetOptions Options;
438446
Options.NoFramePointerElim = true;

branches/try/src/test/run-pass/borrowck-borrow-from-expr-block.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -13,7 +13,7 @@ fn borrow(x: &int, f: &fn(x: &int)) {
1313
}
1414

1515
fn test1(x: @~int) {
16-
do borrow(&**x.clone()) |p| {
16+
do borrow(&*x.clone()) |p| {
1717
let x_a = ptr::addr_of(&(**x));
1818
assert!((x_a as uint) != ptr::to_uint(p));
1919
assert!(unsafe{*x_a} == *p);

0 commit comments

Comments
 (0)