Skip to content

Commit 1fc4bea

Browse files
committed
---
yaml --- r: 139025 b: refs/heads/try2 c: 1a6a37e h: refs/heads/master i: 139023: 129aaf6 v: v3
1 parent 758abd7 commit 1fc4bea

File tree

9 files changed

+36
-34
lines changed

9 files changed

+36
-34
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: 6859a6d9a327d7fcd81a38c8e3af6aa0005f7944
8+
refs/heads/try2: 1a6a37e01a700191f200cd1d9f1ebdf08d1dec2d
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/libcore/rt/thread_local_storage.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type pthread_key_t = c_ulong;
4040

4141
#[cfg(target_os="linux")]
4242
#[cfg(target_os="freebsd")]
43+
#[cfg(target_os="android")]
4344
#[allow(non_camel_case_types)] // foreign type
4445
type pthread_key_t = c_uint;
4546

branches/try2/src/libcore/str.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,7 +2273,6 @@ pub trait StrSlice {
22732273
pure fn to_owned(&self) -> ~str;
22742274
pure fn to_managed(&self) -> @str;
22752275
pure fn char_at(&self, i: uint) -> char;
2276-
fn to_bytes(&self) -> ~[u8];
22772276
}
22782277
22792278
/// Extension methods for strings
@@ -2417,8 +2416,6 @@ impl StrSlice for &self/str {
24172416
24182417
#[inline]
24192418
pure fn char_at(&self, i: uint) -> char { char_at(*self, i) }
2420-
2421-
fn to_bytes(&self) -> ~[u8] { to_bytes(*self) }
24222419
}
24232420
24242421
pub trait OwnedStr {

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: 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) { _s.emit_nil() }
143+
fn encode(&self, _s: &S) { }
144144
}
145145

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

branches/try2/src/libsyntax/parse/mod.rs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,10 @@ mod test {
297297
use std;
298298
use core::io;
299299
use core::option::None;
300+
use core::str;
300301
use util::testing::*;
301302

302-
#[test] fn to_json_str<E : Encodable<std::json::Encoder>>(val: @E) -> ~str {
303+
#[test] fn to_json_str (val: @Encodable<std::json::Encoder>) -> ~str {
303304
do io::with_str_writer |writer| {
304305
val.encode(~std::json::Encoder(writer));
305306
}
@@ -311,18 +312,18 @@ mod test {
311312
@~"fn foo (x : int) { x; }",
312313
~[],
313314
new_parse_sess(None));
314-
check_equal(to_json_str(@tts),
315-
~"[[\"tt_tok\",[null,[\"IDENT\",[\"fn\",false]]]],\
316-
[\"tt_tok\",[null,[\"IDENT\",[\"foo\",false]]]],\
317-
[\"tt_delim\",[[[\"tt_tok\",[null,[\"LPAREN\",[]]]],\
318-
[\"tt_tok\",[null,[\"IDENT\",[\"x\",false]]]],\
319-
[\"tt_tok\",[null,[\"COLON\",[]]]],\
320-
[\"tt_tok\",[null,[\"IDENT\",[\"int\",false]]]],\
321-
[\"tt_tok\",[null,[\"RPAREN\",[]]]]]]],\
322-
[\"tt_delim\",[[[\"tt_tok\",[null,[\"LBRACE\",[]]]],\
323-
[\"tt_tok\",[null,[\"IDENT\",[\"x\",false]]]],\
324-
[\"tt_tok\",[null,[\"SEMI\",[]]]],\
325-
[\"tt_tok\",[null,[\"RBRACE\",[]]]]]]]]"
315+
check_equal(to_json_str(@tts as @Encodable<std::json::Encoder>),
316+
~"[[\"tt_tok\",[,[\"IDENT\",[\"fn\",false]]]],\
317+
[\"tt_tok\",[,[\"IDENT\",[\"foo\",false]]]],\
318+
[\"tt_delim\",[[[\"tt_tok\",[,[\"LPAREN\",[]]]],\
319+
[\"tt_tok\",[,[\"IDENT\",[\"x\",false]]]],\
320+
[\"tt_tok\",[,[\"COLON\",[]]]],\
321+
[\"tt_tok\",[,[\"IDENT\",[\"int\",false]]]],\
322+
[\"tt_tok\",[,[\"RPAREN\",[]]]]]]],\
323+
[\"tt_delim\",[[[\"tt_tok\",[,[\"LBRACE\",[]]]],\
324+
[\"tt_tok\",[,[\"IDENT\",[\"x\",false]]]],\
325+
[\"tt_tok\",[,[\"SEMI\",[]]]],\
326+
[\"tt_tok\",[,[\"RBRACE\",[]]]]]]]]"
326327
);
327328
let ast1 = new_parser_from_tts(new_parse_sess(None),~[],tts)
328329
.parse_item(~[]);

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)