Skip to content

Commit 8b2da15

Browse files
committed
---
yaml --- r: 162214 b: refs/heads/auto c: fdb0d90 h: refs/heads/master v: v3
1 parent 9983690 commit 8b2da15

File tree

235 files changed

+4779
-4887
lines changed

Some content is hidden

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

235 files changed

+4779
-4887
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: d602c058aefc370e33e5aa3e0b0f0819f8f01e71
13+
refs/heads/auto: fdb0d9026e0189141dfdbe08926252efeb21e4d6
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/crates.mk

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test time rand \
5454
log regex graphviz core rbml alloc rustrt \
5555
unicode
56-
RUSTC_CRATES := rustc rustc_typeck rustc_driver rustc_trans rustc_back rustc_llvm
57-
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
56+
HOST_CRATES := syntax rustc rustc_trans rustdoc regex_macros fmt_macros \
57+
rustc_llvm rustc_back
5858
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
6060

@@ -67,16 +67,12 @@ DEPS_std := core libc rand alloc collections rustrt unicode \
6767
native:rust_builtin native:backtrace
6868
DEPS_graphviz := std
6969
DEPS_syntax := std term serialize log fmt_macros arena libc
70-
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back \
71-
rustc_typeck log syntax serialize rustc_llvm rustc_trans
72-
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
73-
log syntax serialize rustc_llvm
74-
DEPS_rustc_typeck := rustc syntax
70+
DEPS_rustc_trans := rustc rustc_back rustc_llvm libc
7571
DEPS_rustc := syntax flate arena serialize getopts rbml \
7672
time log graphviz rustc_llvm rustc_back
7773
DEPS_rustc_llvm := native:rustllvm libc std
7874
DEPS_rustc_back := std syntax rustc_llvm flate log libc
79-
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
75+
DEPS_rustdoc := rustc rustc_trans native:hoedown serialize getopts \
8076
test time
8177
DEPS_flate := std native:miniz
8278
DEPS_arena := std
@@ -98,7 +94,7 @@ DEPS_fmt_macros = std
9894

9995
TOOL_DEPS_compiletest := test getopts
10096
TOOL_DEPS_rustdoc := rustdoc
101-
TOOL_DEPS_rustc := rustc_driver
97+
TOOL_DEPS_rustc := rustc_trans
10298
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
10399
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
104100
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
@@ -114,12 +110,8 @@ ONLY_RLIB_unicode := 1
114110
# You should not need to edit below this line
115111
################################################################################
116112

117-
DOC_CRATES := $(filter-out rustc, \
118-
$(filter-out rustc_trans, \
119-
$(filter-out rustc_typeck, \
120-
$(filter-out rustc_driver, \
121-
$(filter-out syntax, $(CRATES))))))
122-
COMPILER_DOC_CRATES := rustc rustc_trans rustc_typeck rustc_driver syntax
113+
DOC_CRATES := $(filter-out rustc, $(filter-out rustc_trans, $(filter-out syntax, $(CRATES))))
114+
COMPILER_DOC_CRATES := rustc rustc_trans syntax
123115

124116
# This macro creates some simple definitions for each crate being built, just
125117
# some munging of all of the parameters above.

branches/auto/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $(eval $(call RUST_CRATE,coretest))
2121

2222
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
24-
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_trans,$(HOST_CRATES))
24+
TEST_HOST_CRATES = $(HOST_CRATES)
2525
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2626

2727
######################################################################

branches/auto/src/doc/guide.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ $ editor main.rs
140140
```
141141

142142
Rust files always end in a `.rs` extension. If you're using more than one word
143-
in your filename, use an underscore. `hello_world.rs` rather than
143+
in your file name, use an underscore. `hello_world.rs` rather than
144144
`helloworld.rs`.
145145

146146
Now that you've got your file open, type this in:
@@ -200,7 +200,7 @@ about this difference. Just know that sometimes, you'll see a `!`, and that
200200
means that you're calling a macro instead of a normal function. Rust implements
201201
`println!` as a macro rather than a function for good reasons, but that's a
202202
very advanced topic. You'll learn more when we talk about macros later. One
203-
last thing to mention: Rust's macros are significantly different from C macros,
203+
last thing to mention: Rust's macros are significantly different than C macros,
204204
if you've used those. Don't be scared of using macros. We'll get to the details
205205
eventually, you'll just have to trust us for now.
206206

@@ -595,8 +595,8 @@ let y = if x == 5i { 10i } else { 15i };
595595
```
596596

597597
This reveals two interesting things about Rust: it is an expression-based
598-
language, and semicolons are different from semicolons in other 'curly brace
599-
and semicolon'-based languages. These two things are related.
598+
language, and semicolons are different than in other 'curly brace and
599+
semicolon'-based languages. These two things are related.
600600

601601
## Expressions vs. Statements
602602

@@ -1454,7 +1454,7 @@ Both `continue` and `break` are valid in both kinds of loops.
14541454
# Strings
14551455

14561456
Strings are an important concept for any programmer to master. Rust's string
1457-
handling system is a bit different from other languages, due to its systems
1457+
handling system is a bit different than in other languages, due to its systems
14581458
focus. Any time you have a data structure of variable size, things can get
14591459
tricky, and strings are a re-sizable data structure. That said, Rust's strings
14601460
also work differently than in some other systems languages, such as C.
@@ -2064,8 +2064,8 @@ Great! Next up: let's compare our guess to the secret guess.
20642064
## Comparing guesses
20652065

20662066
If you remember, earlier in the guide, we made a `cmp` function that compared
2067-
two numbers. Let's add that in, along with a `match` statement to compare our
2068-
guess to the secret number:
2067+
two numbers. Let's add that in, along with a `match` statement to compare the
2068+
guess to the secret guess:
20692069

20702070
```{rust,ignore}
20712071
use std::io;
@@ -2861,7 +2861,7 @@ parts of your library. The six levels are:
28612861
* experimental: This item was only recently introduced or is otherwise in a
28622862
state of flux. It may change significantly, or even be removed. No guarantee
28632863
of backwards-compatibility.
2864-
* unstable: This item is still under development and requires more testing to
2864+
* unstable: This item is still under development, but requires more testing to
28652865
be considered stable. No guarantee of backwards-compatibility.
28662866
* stable: This item is considered stable, and will not change significantly.
28672867
Guarantee of backwards-compatibility.
@@ -5174,12 +5174,12 @@ processor. Rust's semantics lend themselves very nicely to solving a number of
51745174
issues that programmers have with concurrency. Many concurrency errors that are
51755175
runtime errors in other languages are compile-time errors in Rust.
51765176

5177-
Rust's concurrency primitive is called a **task**. Tasks are similar to
5178-
threads, and do not share memory in an unsafe manner, preferring message
5179-
passing to communicate. It's worth noting that tasks are implemented as a
5180-
library, and not part of the language. This means that in the future, other
5181-
concurrency libraries can be written for Rust to help in specific scenarios.
5182-
Here's an example of creating a task:
5177+
Rust's concurrency primitive is called a **task**. Tasks are lightweight, and
5178+
do not share memory in an unsafe manner, preferring message passing to
5179+
communicate. It's worth noting that tasks are implemented as a library, and
5180+
not part of the language. This means that in the future, other concurrency
5181+
libraries can be written for Rust to help in specific scenarios. Here's an
5182+
example of creating a task:
51835183

51845184
```{rust}
51855185
spawn(proc() {

branches/auto/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ The two values of the boolean type are written `true` and `false`.
522522
### Symbols
523523

524524
```{.ebnf .gram}
525-
symbol : "::" | "->"
525+
symbol : "::" "->"
526526
| '#' | '[' | ']' | '(' | ')' | '{' | '}'
527527
| ',' | ';' ;
528528
```

branches/auto/src/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
extern crate "rustdoc" as this;
1313

1414
#[cfg(rustc)]
15-
extern crate "rustc_driver" as this;
15+
extern crate "rustc_trans" as this;
1616

1717
fn main() { this::main() }

branches/auto/src/etc/gdb_rust_pretty_printing.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,21 @@ def rust_pretty_printer_lookup_function(val):
5454
return RustStructPrinter(val, false)
5555

5656
if enum_member_count == 1:
57-
first_variant_name = enum_members[0].name
58-
if first_variant_name == None:
57+
if enum_members[0].name == None:
5958
# This is a singleton enum
6059
return rust_pretty_printer_lookup_function(val[enum_members[0]])
6160
else:
62-
assert first_variant_name.startswith("RUST$ENCODED$ENUM$")
61+
assert enum_members[0].name.startswith("RUST$ENCODED$ENUM$")
6362
# This is a space-optimized enum
64-
last_separator_index = first_variant_name.rfind("$")
63+
last_separator_index = enum_members[0].name.rfind("$")
6564
second_last_separator_index = first_variant_name.rfind("$", 0, last_separator_index)
6665
disr_field_index = first_variant_name[second_last_separator_index + 1 :
6766
last_separator_index]
6867
disr_field_index = int(disr_field_index)
6968

7069
sole_variant_val = val[enum_members[0]]
7170
disr_field = get_field_at_index(sole_variant_val, disr_field_index)
72-
discriminant = sole_variant_val[disr_field]
73-
74-
# If the discriminant field is a fat pointer we have to consider the
75-
# first word as the true discriminant
76-
if discriminant.type.code == gdb.TYPE_CODE_STRUCT:
77-
discriminant = discriminant[get_field_at_index(discriminant, 0)]
71+
discriminant = int(sole_variant_val[disr_field])
7872

7973
if discriminant == 0:
8074
null_variant_name = first_variant_name[last_separator_index + 1:]
@@ -179,7 +173,7 @@ def to_string(self):
179173

180174
class IdentityPrinter:
181175
def __init__(self, string):
182-
self.string = string
176+
self.string
183177

184178
def to_string(self):
185179
return self.string

branches/auto/src/etc/licenseck.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
"rt/isaac/randport.cpp", # public domain
3939
"rt/isaac/rand.h", # public domain
4040
"rt/isaac/standard.h", # public domain
41-
"libstd/comm/mpsc_queue.rs", # BSD
42-
"libstd/comm/spsc_queue.rs", # BSD
41+
"libstd/sync/mpsc_queue.rs", # BSD
42+
"libstd/sync/spsc_queue.rs", # BSD
43+
"libstd/sync/mpmc_bounded_queue.rs", # BSD
4344
"test/bench/shootout-binarytrees.rs", # BSD
4445
"test/bench/shootout-chameneos-redux.rs", # BSD
4546
"test/bench/shootout-fannkuch-redux.rs", # BSD

branches/auto/src/etc/lldb_rust_formatters.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,9 @@ def print_enum_val(val, internal_dict):
138138
return "<invalid enum encoding: %s>" % first_variant_name
139139

140140
# Read the discriminant
141-
disr_val = val.GetChildAtIndex(0).GetChildAtIndex(disr_field_index)
141+
disr_val = val.GetChildAtIndex(0).GetChildAtIndex(disr_field_index).GetValueAsUnsigned()
142142

143-
# If the discriminant field is a fat pointer we have to consider the
144-
# first word as the true discriminant
145-
if disr_val.GetType().GetTypeClass() == lldb.eTypeClassStruct:
146-
disr_val = disr_val.GetChildAtIndex(0)
147-
148-
if disr_val.GetValueAsUnsigned() == 0:
143+
if disr_val == 0:
149144
# Null case: Print the name of the null-variant
150145
null_variant_name = first_variant_name[last_separator_index + 1:]
151146
return null_variant_name

branches/auto/src/libcollections/trie/set.rs

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// FIXME(conventions): implement bounded iterators
12+
// FIXME(conventions): implement BitOr, BitAnd, BitXor, and Sub
1213
// FIXME(conventions): replace each_reverse by making iter DoubleEnded
1314
// FIXME(conventions): implement iter_mut and into_iter
1415

@@ -462,30 +463,6 @@ impl Extend<uint> for TrieSet {
462463
}
463464
}
464465

465-
impl BitOr<TrieSet, TrieSet> for TrieSet {
466-
fn bitor(&self, rhs: &TrieSet) -> TrieSet {
467-
self.union(rhs).collect()
468-
}
469-
}
470-
471-
impl BitAnd<TrieSet, TrieSet> for TrieSet {
472-
fn bitand(&self, rhs: &TrieSet) -> TrieSet {
473-
self.intersection(rhs).collect()
474-
}
475-
}
476-
477-
impl BitXor<TrieSet, TrieSet> for TrieSet {
478-
fn bitxor(&self, rhs: &TrieSet) -> TrieSet {
479-
self.symmetric_difference(rhs).collect()
480-
}
481-
}
482-
483-
impl Sub<TrieSet, TrieSet> for TrieSet {
484-
fn sub(&self, rhs: &TrieSet) -> TrieSet {
485-
self.difference(rhs).collect()
486-
}
487-
}
488-
489466
/// A forward iterator over a set.
490467
pub struct SetItems<'a> {
491468
iter: Entries<'a, ()>
@@ -592,7 +569,6 @@ impl<'a> Iterator<uint> for UnionItems<'a> {
592569
mod test {
593570
use std::prelude::*;
594571
use std::uint;
595-
use vec::Vec;
596572

597573
use super::TrieSet;
598574

@@ -762,44 +738,4 @@ mod test {
762738
&[1, 5, 9, 13, 19],
763739
&[1, 3, 5, 9, 11, 13, 16, 19, 24]);
764740
}
765-
766-
#[test]
767-
fn test_bit_or() {
768-
let a: TrieSet = vec![1, 2, 3].into_iter().collect();
769-
let b: TrieSet = vec![3, 4, 5].into_iter().collect();
770-
771-
let set: TrieSet = a | b;
772-
let v: Vec<uint> = set.iter().collect();
773-
assert_eq!(v, vec![1u, 2, 3, 4, 5]);
774-
}
775-
776-
#[test]
777-
fn test_bit_and() {
778-
let a: TrieSet = vec![1, 2, 3].into_iter().collect();
779-
let b: TrieSet = vec![2, 3, 4].into_iter().collect();
780-
781-
let set: TrieSet = a & b;
782-
let v: Vec<uint> = set.iter().collect();
783-
assert_eq!(v, vec![2u, 3]);
784-
}
785-
786-
#[test]
787-
fn test_bit_xor() {
788-
let a: TrieSet = vec![1, 2, 3].into_iter().collect();
789-
let b: TrieSet = vec![3, 4, 5].into_iter().collect();
790-
791-
let set: TrieSet = a ^ b;
792-
let v: Vec<uint> = set.iter().collect();
793-
assert_eq!(v, vec![1u, 2, 4, 5]);
794-
}
795-
796-
#[test]
797-
fn test_sub() {
798-
let a: TrieSet = vec![1, 2, 3].into_iter().collect();
799-
let b: TrieSet = vec![3, 4, 5].into_iter().collect();
800-
801-
let set: TrieSet = a - b;
802-
let v: Vec<uint> = set.iter().collect();
803-
assert_eq!(v, vec![1u, 2]);
804-
}
805741
}

branches/auto/src/libcollections/vec_map.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,6 @@ impl<V> VecMap<V> {
115115
VecMap { v: Vec::with_capacity(capacity) }
116116
}
117117

118-
/// Returns the number of elements the `VecMap` can hold without
119-
/// reallocating.
120-
///
121-
/// # Example
122-
///
123-
/// ```
124-
/// use std::collections::VecMap;
125-
/// let map: VecMap<String> = VecMap::with_capacity(10);
126-
/// assert!(map.capacity() >= 10);
127-
/// ```
128-
#[inline]
129-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
130-
pub fn capacity(&self) -> uint {
131-
self.v.capacity()
132-
}
133-
134118
/// Returns an iterator visiting all keys in ascending order by the keys.
135119
/// The iterator's element type is `uint`.
136120
#[unstable = "matches collection reform specification, waiting for dust to settle"]

branches/auto/src/libcore/borrow.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,6 @@ pub enum Cow<'a, T, Sized? B: 'a> where B: ToOwned<T> {
137137
Owned(T)
138138
}
139139

140-
impl<'a, T, Sized? B> Clone for Cow<'a, T, B> where B: ToOwned<T> {
141-
fn clone(&self) -> Cow<'a, T, B> {
142-
match *self {
143-
Borrowed(b) => Borrowed(b),
144-
Owned(ref o) => {
145-
let b: &B = BorrowFrom::borrow_from(o);
146-
Owned(b.to_owned())
147-
},
148-
}
149-
}
150-
}
151-
152140
impl<'a, T, Sized? B> Cow<'a, T, B> where B: ToOwned<T> {
153141
/// Acquire a mutable reference to the owned form of the data.
154142
///

0 commit comments

Comments
 (0)