Skip to content

Commit 02b2696

Browse files
committed
---
yaml --- r: 139019 b: refs/heads/try2 c: fdf8543 h: refs/heads/master i: 139017: 6dc89ed 139015: 7242e93 v: v3
1 parent b6f5537 commit 02b2696

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
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: 2b059c6e5638de7b241ffddb38cef906813de245
8+
refs/heads/try2: fdf8543cf61103e56cd86eadd845a65f12eaad54
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcore/option.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use ops::Add;
4646
use kinds::Copy;
4747
use util;
4848
use num::Zero;
49-
use iter::{BaseIter, MutableIter};
49+
use iter::BaseIter;
5050

5151
#[cfg(test)] use ptr;
5252
#[cfg(test)] use str;
@@ -323,13 +323,6 @@ impl<T> BaseIter<T> for Option<T> {
323323
}
324324
}
325325
326-
impl<T> MutableIter<T> for Option<T> {
327-
#[inline(always)]
328-
fn each_mut(&mut self, f: &fn(&'self mut T) -> bool) {
329-
match *self { None => (), Some(ref mut t) => { f(t); } }
330-
}
331-
}
332-
333326
pub impl<T> Option<T> {
334327
/// Returns true if the option equals `none`
335328
#[inline(always)]

branches/try2/src/libstd/treemap.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pure fn lt<K: Ord + TotalOrd, V>(a: &TreeMap<K, V>,
7272
}
7373
};
7474

75-
a_len < b_len
75+
return a_len < b_len;
7676
}
7777

7878
impl<K: Ord + TotalOrd, V> Ord for TreeMap<K, V> {
@@ -694,13 +694,22 @@ fn remove<K: TotalOrd, V>(node: &mut Option<~TreeNode<K, V>>,
694694

695695
skew(save);
696696

697-
for save.right.each_mut |right| {
697+
match save.right {
698+
Some(ref mut right) => {
698699
skew(right);
699-
for right.right.each_mut |x| { skew(x) }
700+
match right.right {
701+
Some(ref mut x) => { skew(x) },
702+
None => ()
703+
}
704+
}
705+
None => ()
700706
}
701707

702708
split(save);
703-
for save.right.each_mut |x| { split(x) }
709+
match save.right {
710+
Some(ref mut x) => { split(x) },
711+
None => ()
712+
}
704713
}
705714

706715
return removed;
@@ -709,7 +718,7 @@ fn remove<K: TotalOrd, V>(node: &mut Option<~TreeNode<K, V>>,
709718
}
710719

711720
*node = None;
712-
true
721+
return true;
713722
}
714723

715724
#[cfg(test)]

branches/try2/src/libsyntax/codemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl cmp::Eq for span {
140140

141141
impl<S:Encoder> Encodable<S> for span {
142142
/* Note #1972 -- spans are encoded but not decoded */
143-
fn encode(&self, _s: &S) { }
143+
fn encode(&self, _s: &S) { _s.emit_nil() }
144144
}
145145

146146
impl<D:Decoder> Decodable<D> for span {

branches/try2/src/rustllvm/RustWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,10 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
433433
Options.EnableSegmentedStacks = EnableSegmentedStacks;
434434

435435
std::string Err;
436-
std::string Trip(Triple::normalize(triple));
436+
const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err);
437437
std::string FeaturesStr;
438+
std::string Trip(triple);
438439
std::string CPUStr("generic");
439-
const Target *TheTarget = TargetRegistry::lookupTarget(Trip, Err);
440440
TargetMachine *Target =
441441
TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr,
442442
Options, Reloc::PIC_,

0 commit comments

Comments
 (0)