Skip to content

Commit 52789cd

Browse files
author
Robert Gawdzik
committed
---
yaml --- r: 149819 b: refs/heads/try2 c: 3bf724e h: refs/heads/master i: 149817: 4a1e096 149815: 4c32a45 v: v3
1 parent a1e578e commit 52789cd

File tree

159 files changed

+2002
-2374
lines changed

Some content is hidden

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

159 files changed

+2002
-2374
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: 5f64adc44b1245ba644f66c29d6bbc5c940422c9
8+
refs/heads/try2: 3bf724e44bd691871e700d90e0665743112577d5
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/RELEASES.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,8 @@ Version 0.2 (March 2012)
745745
* Merged per-platform std::{os*, fs*} to core::{libc, os}
746746
* Extensive cleanup, regularization in libstd, libcore
747747

748-
Version 0.1 (January 20, 2012)
749-
-------------------------------
748+
Version 0.1 (January 2012)
749+
---------------------------
750750

751751
* Most language features work, including:
752752
* Unique pointers, unique closures, move semantics

branches/try2/src/libcollections/btree.rs

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for BTree<K, V> {
9292
}
9393
}
9494

95-
impl<K: TotalOrd, V: TotalEq> Eq for BTree<K, V> {
96-
fn eq(&self, other: &BTree<K, V>) -> bool {
97-
self.equals(other)
98-
}
99-
}
10095

10196
impl<K: TotalOrd, V: TotalEq> TotalEq for BTree<K, V> {
10297
///Testing equality on BTrees by comparing the root.
@@ -105,12 +100,6 @@ impl<K: TotalOrd, V: TotalEq> TotalEq for BTree<K, V> {
105100
}
106101
}
107102

108-
impl<K: TotalOrd, V: TotalEq> Ord for BTree<K, V> {
109-
fn lt(&self, other: &BTree<K, V>) -> bool {
110-
self.cmp(other) == Less
111-
}
112-
}
113-
114103
impl<K: TotalOrd, V: TotalEq> TotalOrd for BTree<K, V> {
115104
///Returns an ordering based on the root nodes of each BTree.
116105
fn cmp(&self, other: &BTree<K, V>) -> Ordering {
@@ -202,12 +191,6 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for Node<K, V> {
202191
}
203192
}
204193

205-
impl<K: TotalOrd, V: TotalEq> Eq for Node<K, V> {
206-
fn eq(&self, other: &Node<K, V>) -> bool {
207-
self.equals(other)
208-
}
209-
}
210-
211194
impl<K: TotalOrd, V: TotalEq> TotalEq for Node<K, V> {
212195
///Returns whether two nodes are equal based on the keys of each element.
213196
///Two nodes are equal if all of their keys are the same.
@@ -232,12 +215,6 @@ impl<K: TotalOrd, V: TotalEq> TotalEq for Node<K, V> {
232215
}
233216
}
234217

235-
impl<K: TotalOrd, V: TotalEq> Ord for Node<K, V> {
236-
fn lt(&self, other: &Node<K, V>) -> bool {
237-
self.cmp(other) == Less
238-
}
239-
}
240-
241218
impl<K: TotalOrd, V: TotalEq> TotalOrd for Node<K, V> {
242219
///Implementation of TotalOrd for Nodes.
243220
fn cmp(&self, other: &Node<K, V>) -> Ordering {
@@ -403,25 +380,13 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for Leaf<K, V> {
403380
}
404381
}
405382

406-
impl<K: TotalOrd, V: TotalEq> Eq for Leaf<K, V> {
407-
fn eq(&self, other: &Leaf<K, V>) -> bool {
408-
self.equals(other)
409-
}
410-
}
411-
412383
impl<K: TotalOrd, V: TotalEq> TotalEq for Leaf<K, V> {
413384
///Implementation of equals function for leaves that compares LeafElts.
414385
fn equals(&self, other: &Leaf<K, V>) -> bool {
415386
self.elts.equals(&other.elts)
416387
}
417388
}
418389

419-
impl<K: TotalOrd, V: TotalEq> Ord for Leaf<K, V> {
420-
fn lt(&self, other: &Leaf<K, V>) -> bool {
421-
self.cmp(other) == Less
422-
}
423-
}
424-
425390
impl<K: TotalOrd, V: TotalEq> TotalOrd for Leaf<K, V> {
426391
///Returns an ordering based on the first element of each Leaf.
427392
fn cmp(&self, other: &Leaf<K, V>) -> Ordering {
@@ -637,25 +602,13 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for Branch<K, V> {
637602
}
638603
}
639604

640-
impl<K: TotalOrd, V: TotalEq> Eq for Branch<K, V> {
641-
fn eq(&self, other: &Branch<K, V>) -> bool {
642-
self.equals(other)
643-
}
644-
}
645-
646605
impl<K: TotalOrd, V: TotalEq> TotalEq for Branch<K, V> {
647606
///Equals function for Branches--compares all the elements in each branch
648607
fn equals(&self, other: &Branch<K, V>) -> bool {
649608
self.elts.equals(&other.elts)
650609
}
651610
}
652611

653-
impl<K: TotalOrd, V: TotalEq> Ord for Branch<K, V> {
654-
fn lt(&self, other: &Branch<K, V>) -> bool {
655-
self.cmp(other) == Less
656-
}
657-
}
658-
659612
impl<K: TotalOrd, V: TotalEq> TotalOrd for Branch<K, V> {
660613
///Compares the first elements of two branches to determine an ordering
661614
fn cmp(&self, other: &Branch<K, V>) -> Ordering {
@@ -710,25 +663,13 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for LeafElt<K, V> {
710663
}
711664
}
712665

713-
impl<K: TotalOrd, V: TotalEq> Eq for LeafElt<K, V> {
714-
fn eq(&self, other: &LeafElt<K, V>) -> bool {
715-
self.equals(other)
716-
}
717-
}
718-
719666
impl<K: TotalOrd, V: TotalEq> TotalEq for LeafElt<K, V> {
720667
///TotalEq for LeafElts
721668
fn equals(&self, other: &LeafElt<K, V>) -> bool {
722669
self.key.equals(&other.key) && self.value.equals(&other.value)
723670
}
724671
}
725672

726-
impl<K: TotalOrd, V: TotalEq> Ord for LeafElt<K, V> {
727-
fn lt(&self, other: &LeafElt<K, V>) -> bool {
728-
self.cmp(other) == Less
729-
}
730-
}
731-
732673
impl<K: TotalOrd, V: TotalEq> TotalOrd for LeafElt<K, V> {
733674
///Returns an ordering based on the keys of the LeafElts.
734675
fn cmp(&self, other: &LeafElt<K, V>) -> Ordering {
@@ -764,25 +705,13 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for BranchElt<K, V> {
764705
}
765706
}
766707

767-
impl<K: TotalOrd, V: TotalEq> Eq for BranchElt<K, V>{
768-
fn eq(&self, other: &BranchElt<K, V>) -> bool {
769-
self.equals(other)
770-
}
771-
}
772-
773708
impl<K: TotalOrd, V: TotalEq> TotalEq for BranchElt<K, V>{
774709
///TotalEq for BranchElts
775710
fn equals(&self, other: &BranchElt<K, V>) -> bool {
776711
self.key.equals(&other.key)&&self.value.equals(&other.value)
777712
}
778713
}
779714

780-
impl<K: TotalOrd, V: TotalEq> Ord for BranchElt<K, V> {
781-
fn lt(&self, other: &BranchElt<K, V>) -> bool {
782-
self.cmp(other) == Less
783-
}
784-
}
785-
786715
impl<K: TotalOrd, V: TotalEq> TotalOrd for BranchElt<K, V> {
787716
///Fulfills TotalOrd for BranchElts
788717
fn cmp(&self, other: &BranchElt<K, V>) -> Ordering {

branches/try2/src/libcollections/dlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ impl<A: Eq> Eq for DList<A> {
607607
}
608608
}
609609

610-
impl<A: Ord> Ord for DList<A> {
610+
impl<A: Eq + Ord> Ord for DList<A> {
611611
fn lt(&self, other: &DList<A>) -> bool {
612612
iter::order::lt(self.iter(), other.iter())
613613
}

branches/try2/src/libextra/workcache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ use std::io::{File, MemWriter};
8888
*
8989
*/
9090

91-
#[deriving(Clone, Eq, Encodable, Decodable, Ord, TotalOrd, TotalEq)]
91+
#[deriving(Clone, Eq, Encodable, Decodable, TotalOrd, TotalEq)]
9292
struct WorkKey {
9393
kind: ~str,
9494
name: ~str

branches/try2/src/librustc/back/archive.rs

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use metadata::filesearch;
1616
use lib::llvm::{ArchiveRef, llvm};
1717

1818
use std::cast;
19-
use std::vec_ng::Vec;
2019
use std::io::fs;
2120
use std::io;
2221
use std::libc;
@@ -42,7 +41,7 @@ fn run_ar(sess: Session, args: &str, cwd: Option<&Path>,
4241
paths: &[&Path]) -> ProcessOutput {
4342
let ar = get_ar_prog(sess);
4443

45-
let mut args = vec!(args.to_owned());
44+
let mut args = ~[args.to_owned()];
4645
let mut paths = paths.iter().map(|p| p.as_str().unwrap().to_owned());
4746
args.extend(&mut paths);
4847
debug!("{} {}", ar, args.connect(" "));
@@ -90,25 +89,17 @@ impl Archive {
9089
}
9190

9291
/// Read a file in the archive
93-
pub fn read(&self, file: &str) -> Vec<u8> {
92+
pub fn read(&self, file: &str) -> ~[u8] {
9493
// Apparently if "ar p" is used on windows, it generates a corrupt file
9594
// which has bad headers and LLVM will immediately choke on it
9695
if cfg!(windows) && cfg!(windows) { // FIXME(#10734) double-and
9796
let loc = TempDir::new("rsar").unwrap();
9897
let archive = os::make_absolute(&self.dst);
9998
run_ar(self.sess, "x", Some(loc.path()), [&archive,
10099
&Path::new(file)]);
101-
let result: Vec<u8> =
102-
fs::File::open(&loc.path().join(file)).read_to_end()
103-
.unwrap()
104-
.move_iter()
105-
.collect();
106-
result
100+
fs::File::open(&loc.path().join(file)).read_to_end().unwrap()
107101
} else {
108-
run_ar(self.sess,
109-
"p",
110-
None,
111-
[&self.dst, &Path::new(file)]).output.move_iter().collect()
102+
run_ar(self.sess, "p", None, [&self.dst, &Path::new(file)]).output
112103
}
113104
}
114105

@@ -128,11 +119,11 @@ impl Archive {
128119
lto: bool) -> io::IoResult<()> {
129120
let object = format!("{}.o", name);
130121
let bytecode = format!("{}.bc", name);
131-
let mut ignore = vec!(METADATA_FILENAME, bytecode.as_slice());
122+
let mut ignore = ~[METADATA_FILENAME, bytecode.as_slice()];
132123
if lto {
133124
ignore.push(object.as_slice());
134125
}
135-
self.add_archive(rlib, name, ignore.as_slice())
126+
self.add_archive(rlib, name, ignore)
136127
}
137128

138129
/// Adds an arbitrary file to this archive
@@ -152,7 +143,7 @@ impl Archive {
152143
}
153144

154145
/// Lists all files in an archive
155-
pub fn files(&self) -> Vec<~str> {
146+
pub fn files(&self) -> ~[~str] {
156147
let output = run_ar(self.sess, "t", None, [&self.dst]);
157148
let output = str::from_utf8(output.output).unwrap();
158149
// use lines_any because windows delimits output with `\r\n` instead of
@@ -177,7 +168,7 @@ impl Archive {
177168
// all SYMDEF files as these are just magical placeholders which get
178169
// re-created when we make a new archive anyway.
179170
let files = try!(fs::readdir(loc.path()));
180-
let mut inputs = Vec::new();
171+
let mut inputs = ~[];
181172
for file in files.iter() {
182173
let filename = file.filename_str().unwrap();
183174
if skip.iter().any(|s| *s == filename) { continue }
@@ -191,7 +182,7 @@ impl Archive {
191182
if inputs.len() == 0 { return Ok(()) }
192183

193184
// Finally, add all the renamed files to this archive
194-
let mut args = vec!(&self.dst);
185+
let mut args = ~[&self.dst];
195186
args.extend(&mut inputs.iter());
196187
run_ar(self.sess, "r", None, args.as_slice());
197188
Ok(())

branches/try2/src/librustc/back/arm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use syntax::abi;
1515

1616
pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
1717
let cc_args = if target_triple.contains("thumb") {
18-
vec!(~"-mthumb")
18+
~[~"-mthumb"]
1919
} else {
20-
vec!(~"-marm")
20+
~[~"-marm"]
2121
};
2222
return target_strs::t {
2323
module_asm: ~"",

0 commit comments

Comments
 (0)