Skip to content

Commit 10c6738

Browse files
committed
---
yaml --- r: 158077 b: refs/heads/master c: 1571aba h: refs/heads/master i: 158075: 7cbf177 v: v3
1 parent 6195bdd commit 10c6738

File tree

181 files changed

+3241
-4220
lines changed

Some content is hidden

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

181 files changed

+3241
-4220
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: dbb9c99911a72bcfdb590472493126c4f1924a1d
2+
refs/heads/master: 1571abae53d77f36352b543a595969f1ef21503b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 1b2ad7831f1745bf4a4709a1fa1772afb47c933c
55
refs/heads/try: 98bd84a3300f974f400a3eeb56567ad3f77b13f0

trunk/mk/main.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ endif
100100
CFG_RUSTC_FLAGS := $(RUSTFLAGS)
101101
CFG_GCCISH_CFLAGS :=
102102
CFG_GCCISH_LINK_FLAGS :=
103-
104-
# Turn off broken quarantine (see jemalloc/jemalloc#161)
105-
CFG_JEMALLOC_FLAGS := --disable-fill
103+
CFG_JEMALLOC_FLAGS :=
106104

107105
ifdef CFG_DISABLE_OPTIMIZE
108106
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))

trunk/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ fn find_rust_src_root(config: &Config) -> Option<Path> {
627627
let path_postfix = Path::new("src/etc/lldb_batchmode.py");
628628

629629
while path.pop() {
630-
if path.join(&path_postfix).is_file() {
630+
if path.join(path_postfix.clone()).is_file() {
631631
return Some(path);
632632
}
633633
}

trunk/src/doc/guide-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ The benchmarking runner offers two ways to avoid this. Either, the
287287
closure that the `iter` method receives can return an arbitrary value
288288
which forces the optimizer to consider the result used and ensures it
289289
cannot remove the computation entirely. This could be done for the
290-
example above by adjusting the `b.iter` call to
290+
example above by adjusting the `bh.iter` call to
291291

292292
~~~
293293
# struct X; impl X { fn iter<T>(&self, _: || -> T) {} } let b = X;

trunk/src/doc/guide.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ fn add_one(x: int) -> int {
777777
x + 1;
778778
}
779779
780-
help: consider removing this semicolon:
780+
note: consider removing this semicolon:
781781
x + 1;
782782
^
783783
```
@@ -4467,19 +4467,18 @@ see why consumers matter.
44674467

44684468
## Iterators
44694469

4470-
As we've said before, an iterator is something that we can call the
4471-
`.next()` method on repeatedly, and it gives us a sequence of things.
4472-
Because you need to call the method, this means that iterators
4473-
are **lazy** and don't need to generate all of the values upfront.
4474-
This code, for example, does not actually generate the numbers
4475-
`1-100`, and just creates a value that represents the sequence:
4470+
As we've said before, an iterator is something that we can call the `.next()`
4471+
method on repeatedly, and it gives us a sequence of things. Because you need
4472+
to call the method, this means that iterators are **lazy**. This code, for
4473+
example, does not actually generate the numbers `1-100`, and just creates a
4474+
value that represents the sequence:
44764475

44774476
```{rust}
44784477
let nums = range(1i, 100i);
44794478
```
44804479

44814480
Since we didn't do anything with the range, it didn't generate the sequence.
4482-
Let's add the consumer:
4481+
Once we add the consumer:
44834482

44844483
```{rust}
44854484
let nums = range(1i, 100i).collect::<Vec<int>>();
@@ -4508,8 +4507,8 @@ std::iter::count(1i, 5i);
45084507
```
45094508

45104509
This iterator counts up from one, adding five each time. It will give
4511-
you a new integer every time, forever (well, technically, until it reaches the
4512-
maximum number representable by an `int`). But since iterators are lazy,
4510+
you a new integer every time, forever. Well, technically, until the
4511+
maximum number that an `int` can represent. But since iterators are lazy,
45134512
that's okay! You probably don't want to use `collect()` on it, though...
45144513

45154514
That's enough about iterators. Iterator adapters are the last concept
@@ -5252,8 +5251,8 @@ to do something that it can't currently do? You may be able to write a macro
52525251
to extend Rust's capabilities.
52535252

52545253
You've already used one macro extensively: `println!`. When we invoke
5255-
a Rust macro, we need to use the exclamation mark (`!`). There are two reasons
5256-
why this is so: the first is that it makes it clear when you're using a
5254+
a Rust macro, we need to use the exclamation mark (`!`). There's two reasons
5255+
that this is true: the first is that it makes it clear when you're using a
52575256
macro. The second is that macros allow for flexible syntax, and so Rust must
52585257
be able to tell where a macro starts and ends. The `!(...)` helps with this.
52595258

@@ -5268,7 +5267,7 @@ println!("x is: {}", x);
52685267

52695268
The `println!` macro does a few things:
52705269

5271-
1. It parses the string to find any `{}`s.
5270+
1. It parses the string to find any `{}`s
52725271
2. It checks that the number of `{}`s matches the number of other arguments.
52735272
3. It generates a bunch of Rust code, taking this in mind.
52745273

@@ -5277,8 +5276,8 @@ Rust will generate code that takes all of the types into account. If
52775276
`println!` was a function, it could still do this type checking, but it
52785277
would happen at run time rather than compile time.
52795278

5280-
We can check this out using a special flag to `rustc`. Put this code in a file
5281-
called `print.rs`:
5279+
We can check this out using a special flag to `rustc`. This code, in a file
5280+
`print.rs`:
52825281

52835282
```{rust}
52845283
fn main() {
@@ -5287,7 +5286,7 @@ fn main() {
52875286
}
52885287
```
52895288

5290-
You can have the macros expanded like this: `rustc print.rs --pretty=expanded` – which will
5289+
Can have its macros expanded like this: `rustc print.rs --pretty=expanded`, will
52915290
give us this huge result:
52925291

52935292
```{rust,ignore}
@@ -5326,12 +5325,12 @@ invoke the `println_args` function with the generated arguments.
53265325
This is the code that Rust actually compiles. You can see all of the extra
53275326
information that's here. We get all of the type safety and options that it
53285327
provides, but at compile time, and without needing to type all of this out.
5329-
This is how macros are powerful: without them you would need to type all of
5330-
this by hand to get a type-checked `println`.
5328+
This is how macros are powerful. Without them, you would need to type all of
5329+
this by hand to get a type checked `println`.
53315330

53325331
For more on macros, please consult [the Macros Guide](guide-macros.html).
5333-
Macros are a very advanced and still slightly experimental feature, but they don't
5334-
require a deep understanding to be called, since they look just like functions. The
5332+
Macros are a very advanced and still slightly experimental feature, but don't
5333+
require a deep understanding to call, since they look just like functions. The
53355334
Guide can help you if you want to write your own.
53365335

53375336
# Unsafe
@@ -5348,8 +5347,8 @@ keyword, which indicates that the function may not behave properly.
53485347

53495348
Second, if you'd like to create some sort of shared-memory data structure, Rust
53505349
won't allow it, because memory must be owned by a single owner. However, if
5351-
you're planning on making access to that shared memory safe such as with a
5352-
mutex _you_ know that it's safe, but Rust can't know. Writing an `unsafe`
5350+
you're planning on making access to that shared memory safe, such as with a
5351+
mutex, _you_ know that it's safe, but Rust can't know. Writing an `unsafe`
53535352
block allows you to ask the compiler to trust you. In this case, the _internal_
53545353
implementation of the mutex is considered unsafe, but the _external_ interface
53555354
we present is safe. This allows it to be effectively used in normal Rust, while

trunk/src/doc/intro.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -494,14 +494,14 @@ non-deterministic aspect:
494494
$ cargo run
495495
Compiling hello_world v0.0.1 (file:///Users/you/src/hello_world)
496496
Running `target/hello_world`
497-
numbers[1] is 3
498-
numbers[0] is 2
499-
numbers[2] is 4
497+
numbers[1] is 2
498+
numbers[0] is 1
499+
numbers[2] is 3
500500
$ cargo run
501501
Running `target/hello_world`
502-
numbers[2] is 4
503-
numbers[1] is 3
504-
numbers[0] is 2
502+
numbers[2] is 3
503+
numbers[1] is 2
504+
numbers[0] is 1
505505
```
506506

507507
Each time, we get a slightly different output, because each thread works in a

trunk/src/doc/reference.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,11 @@ An _integer literal_ has one of four forms:
400400
* A _decimal literal_ starts with a *decimal digit* and continues with any
401401
mixture of *decimal digits* and _underscores_.
402402
* A _hex literal_ starts with the character sequence `U+0030` `U+0078`
403-
(`0x`) and continues as any mixture of hex digits and underscores.
403+
(`0x`) and continues as any mixture hex digits and underscores.
404404
* An _octal literal_ starts with the character sequence `U+0030` `U+006F`
405-
(`0o`) and continues as any mixture of octal digits and underscores.
405+
(`0o`) and continues as any mixture octal digits and underscores.
406406
* A _binary literal_ starts with the character sequence `U+0030` `U+0062`
407-
(`0b`) and continues as any mixture of binary digits and underscores.
407+
(`0b`) and continues as any mixture binary digits and underscores.
408408

409409
An integer literal may be followed (immediately, without any spaces) by an
410410
_integer suffix_, which changes the type of the literal. There are two kinds of
@@ -944,10 +944,10 @@ An example of `use` declarations:
944944
```
945945
use std::iter::range_step;
946946
use std::option::{Some, None};
947-
use std::collections::hash_map::{mod, HashMap};
947+
use std::collections::hashmap::{mod, HashMap};
948948
949-
fn foo<T>(_: T){}
950-
fn bar(map1: HashMap<String, uint>, map2: hash_map::HashMap<String, uint>){}
949+
# fn foo<T>(_: T){}
950+
# fn bar(map: HashMap<String, uint>, set: hashmap::HashSet<String>){}
951951
952952
fn main() {
953953
// Equivalent to 'std::iter::range_step(0u, 10u, 2u);'
@@ -957,10 +957,10 @@ fn main() {
957957
// std::option::None]);'
958958
foo(vec![Some(1.0f64), None]);
959959
960-
// Both `hash_map` and `HashMap` are in scope.
961-
let map1 = HashMap::new();
962-
let map2 = hash_map::HashMap::new();
963-
bar(map1, map2);
960+
// Both `hash` and `HashMap` are in scope.
961+
let map = HashMap::new();
962+
let set = hashmap::HashSet::new();
963+
bar(map, set);
964964
}
965965
```
966966

@@ -2100,15 +2100,15 @@ plugins](guide-plugin.html#lint-plugins) can provide additional lint checks.
21002100
```{.ignore}
21012101
mod m1 {
21022102
// Missing documentation is ignored here
2103-
#[allow(missing_docs)]
2103+
#[allow(missing_doc)]
21042104
pub fn undocumented_one() -> int { 1 }
21052105
21062106
// Missing documentation signals a warning here
2107-
#[warn(missing_docs)]
2107+
#[warn(missing_doc)]
21082108
pub fn undocumented_too() -> int { 2 }
21092109
21102110
// Missing documentation signals an error here
2111-
#[deny(missing_docs)]
2111+
#[deny(missing_doc)]
21122112
pub fn undocumented_end() -> int { 3 }
21132113
}
21142114
```
@@ -2117,16 +2117,16 @@ This example shows how one can use `allow` and `warn` to toggle a particular
21172117
check on and off.
21182118

21192119
```{.ignore}
2120-
#[warn(missing_docs)]
2120+
#[warn(missing_doc)]
21212121
mod m2{
2122-
#[allow(missing_docs)]
2122+
#[allow(missing_doc)]
21232123
mod nested {
21242124
// Missing documentation is ignored here
21252125
pub fn undocumented_one() -> int { 1 }
21262126
21272127
// Missing documentation signals a warning here,
21282128
// despite the allow above.
2129-
#[warn(missing_docs)]
2129+
#[warn(missing_doc)]
21302130
pub fn undocumented_two() -> int { 2 }
21312131
}
21322132
@@ -2139,10 +2139,10 @@ This example shows how one can use `forbid` to disallow uses of `allow` for
21392139
that lint check.
21402140

21412141
```{.ignore}
2142-
#[forbid(missing_docs)]
2142+
#[forbid(missing_doc)]
21432143
mod m3 {
21442144
// Attempting to toggle warning signals an error here
2145-
#[allow(missing_docs)]
2145+
#[allow(missing_doc)]
21462146
/// Returns 2.
21472147
pub fn undocumented_too() -> int { 2 }
21482148
}
@@ -4096,7 +4096,7 @@ cause transitions between the states. The lifecycle states of a task are:
40964096

40974097
* running
40984098
* blocked
4099-
* panicked
4099+
* panicked
41004100
* dead
41014101

41024102
A task begins its lifecycle &mdash; once it has been spawned &mdash; in the

trunk/src/doc/rust.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ body {
6262
font-size: 18px;
6363
color: #333;
6464
line-height: 1.428571429;
65-
66-
-webkit-font-feature-settings: "kern", "liga";
67-
-moz-font-feature-settings: "kern", "liga";
68-
font-feature-settings: "kern", "liga";
6965
}
7066
@media (min-width: 768px) {
7167
body {

trunk/src/etc/unicode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
3535
// NOTE: The following code was generated by "src/etc/unicode.py", do not edit directly
3636
37-
#![allow(missing_docs, non_uppercase_statics, non_snake_case)]
37+
#![allow(missing_doc, non_uppercase_statics, non_snake_case)]
3838
'''
3939

4040
# Mapping taken from Table 12 from:

trunk/src/etc/vim/autoload/rust.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@ function! s:WithPath(func, ...)
178178
call mkdir(tmpdir)
179179

180180
let save_cwd = getcwd()
181-
silent exe 'lcd' fnameescape(tmpdir)
181+
silent exe 'lcd' tmpdir
182182

183183
let path = 'unnamed.rs'
184184

185185
let save_mod = &mod
186186
set nomod
187187

188-
silent exe 'keepalt write! ' . fnameescape(path)
188+
silent exe 'keepalt write! ' . path
189189
if pathisempty
190190
silent keepalt 0file
191191
endif
@@ -195,10 +195,10 @@ function! s:WithPath(func, ...)
195195

196196
call call(a:func, [path] + a:000)
197197
finally
198-
if exists("save_mod") | let &mod = save_mod | endif
199-
if exists("save_write") | let &write = save_write | endif
200-
if exists("save_cwd") | silent exe 'lcd' fnameescape(save_cwd) | endif
201-
if exists("tmpdir") | silent call s:RmDir(tmpdir) | endif
198+
if exists("save_mod") | let &mod = save_mod | endif
199+
if exists("save_write") | let &write = save_write | endif
200+
if exists("save_cwd") | silent exe 'lcd' save_cwd | endif
201+
if exists("tmpdir") | silent call s:RmDir(tmpdir) | endif
202202
endtry
203203
endfunction
204204

trunk/src/libcollections/bit.rs renamed to trunk/src/libcollections/bitv.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// FIXME(Gankro): Bitv and BitvSet are very tightly coupled. Ideally (for maintenance),
12-
// they should be in separate files/modules, with BitvSet only using Bitv's public API.
13-
1411
//! Collections implemented with bit vectors.
1512
//!
1613
//! # Example
@@ -1657,7 +1654,7 @@ mod tests {
16571654
use std::rand::Rng;
16581655
use test::Bencher;
16591656

1660-
use super::{Bitv, BitvSet, from_fn, from_bytes};
1657+
use bitv::{Bitv, BitvSet, from_fn, from_bytes};
16611658
use bitv;
16621659
use vec::Vec;
16631660

trunk/src/libcollections/btree/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use core::default::Default;
2323
use core::{iter, fmt, mem};
2424
use core::fmt::Show;
2525

26-
use ring_buf::RingBuf;
26+
use ringbuf::RingBuf;
2727

2828
/// A map based on a B-Tree.
2929
///

trunk/src/libcollections/btree/mod.rs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
pub use self::map::BTreeMap;
12+
pub use self::map::Entries;
13+
pub use self::map::MutEntries;
14+
pub use self::map::MoveEntries;
15+
pub use self::map::Keys;
16+
pub use self::map::Values;
17+
pub use self::map::Entry;
18+
pub use self::map::Occupied;
19+
pub use self::map::Vacant;
20+
pub use self::map::OccupiedEntry;
21+
pub use self::map::VacantEntry;
22+
23+
pub use self::set::BTreeSet;
24+
pub use self::set::Items;
25+
pub use self::set::MoveItems;
26+
pub use self::set::DifferenceItems;
27+
pub use self::set::UnionItems;
28+
pub use self::set::SymDifferenceItems;
29+
pub use self::set::IntersectionItems;
30+
31+
1132
mod node;
12-
pub mod map;
13-
pub mod set;
33+
mod map;
34+
mod set;

trunk/src/libcollections/btree/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use core::prelude::*;
1515

16-
use btree_map::{BTreeMap, Keys, MoveEntries};
16+
use super::{BTreeMap, Keys, MoveEntries};
1717
use std::hash::Hash;
1818
use core::default::Default;
1919
use core::{iter, fmt};

0 commit comments

Comments
 (0)