Skip to content

Commit 7242e93

Browse files
committed
---
yaml --- r: 139015 b: refs/heads/try2 c: a49ccee h: refs/heads/master i: 139013: 02d0541 139011: 30bba9b 139007: ec0376a v: v3
1 parent 40b0e2f commit 7242e93

File tree

5 files changed

+17
-19
lines changed

5 files changed

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

branches/try2/src/libcore/core.rc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ Implicitly, all crates behave as if they included the following prologue:
5656

5757
// On Linux, link to the runtime with -lrt.
5858
#[cfg(target_os = "linux")]
59-
#[doc(hidden)]
6059
pub mod linkhack {
6160
#[link_args="-lrustrt -lrt"]
6261
#[link_args = "-lpthread"]
@@ -253,7 +252,7 @@ pub mod rt;
253252
// A curious inner-module that's not exported that contains the binding
254253
// 'core' so that macro-expanded references to core::error and such
255254
// can be resolved within libcore.
256-
#[doc(hidden)]
255+
#[doc(hidden)] // FIXME #3538
257256
pub mod core {
258257
#[cfg(stage0)]
259258
pub const error : u32 = 1_u32;

branches/try2/src/libcore/option.rs

Lines changed: 8 additions & 1 deletion
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;
49+
use iter::{BaseIter, MutableIter};
5050

5151
#[cfg(test)] use ptr;
5252
#[cfg(test)] use str;
@@ -323,6 +323,13 @@ 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+
326333
pub impl<T> Option<T> {
327334
/// Returns true if the option equals `none`
328335
#[inline(always)]

branches/try2/src/librustdoc/rustdoc.rc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ fn run(config: Config) {
116116
// Remove things marked doc(hidden)
117117
prune_hidden_pass::mk_pass(),
118118
// Remove things that are private
119-
prune_private_pass::mk_pass(),
119+
// XXX enable this after 'export' is removed in favor of 'pub'
120+
// prune_private_pass::mk_pass(),
120121
// Extract brief documentation from the full descriptions
121122
desc_to_brief_pass::mk_pass(),
122123
// Massage the text to remove extra indentation

branches/try2/src/libstd/treemap.rs

Lines changed: 5 additions & 14 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-
return a_len < b_len;
75+
a_len < b_len
7676
}
7777

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

695695
skew(save);
696696

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

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

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

720711
*node = None;
721-
return true;
712+
true
722713
}
723714

724715
#[cfg(test)]

0 commit comments

Comments
 (0)