Skip to content

Commit 306d0c2

Browse files
committed
---
yaml --- r: 128475 b: refs/heads/auto c: 9af4e32 h: refs/heads/master i: 128473: 1fc8bd4 128471: 2224e7a v: v3
1 parent ad7c5f4 commit 306d0c2

File tree

214 files changed

+2031
-838
lines changed

Some content is hidden

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

214 files changed

+2031
-838
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: dcccf824b1096cc596671724ebf42b8d3ed35705
16+
refs/heads/auto: 9af4e325af28f6859bff1c1dd52c68a321dd337d
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ for the 'std' and 'extra' libraries.
1919
To generate HTML documentation from one source file/crate, do something like:
2020

2121
~~~~
22-
rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs
22+
rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
2323
~~~~
2424

2525
(This, of course, requires a working build of the `rustdoc` tool.)

branches/auto/src/doc/guide-unsafe.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,11 +537,12 @@ extern crate core;
537537
use core::prelude::*;
538538
539539
use core::mem;
540-
use core::raw::Slice;
541540
542541
#[no_mangle]
543542
pub extern fn dot_product(a: *const u32, a_len: u32,
544543
b: *const u32, b_len: u32) -> u32 {
544+
use core::raw::Slice;
545+
545546
// Convert the provided arrays into Rust slices.
546547
// The core::raw module guarantees that the Slice
547548
// structure has the same memory layout as a &[T]

branches/auto/src/doc/guide.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ note: in expansion of format_args!
517517
<std macros>:1:1: 3:2 note: in expansion of println!
518518
src/hello_world.rs:4:5: 4:42 note: expansion site
519519
error: aborting due to previous error
520-
Could not execute process `rustc src/hello_world.rs --crate-type bin --out-dir /home/you/projects/hello_world/target -L /home/you/projects/hello_world/target -L /home/you/projects/hello_world/target/deps` (status=101)
520+
Could not compile `hello_world`.
521521
```
522522

523523
Rust will not let us use a value that has not been initialized. So why let us
@@ -532,7 +532,7 @@ in the middle of a string." We add a comma, and then `x`, to indicate that we
532532
want `x` to be the value we're interpolating. The comma is used to separate
533533
arguments we pass to functions and macros, if you're passing more than one.
534534

535-
When you just use the double curly braces, Rust will attempt to display the
535+
When you just use the curly braces, Rust will attempt to display the
536536
value in a meaningful way by checking out its type. If you want to specify the
537537
format in a more detailed manner, there are a [wide number of options
538538
available](/std/fmt/index.html). For now, we'll just stick to the default:
@@ -3669,10 +3669,9 @@ manually free this allocation! If we write
36693669
```
36703670

36713671
then Rust will automatically free `x` at the end of the block. This isn't
3672-
because Rust has a garbage collector -- it doesn't. Instead, Rust uses static
3673-
analysis to determine the *lifetime* of `x`, and then generates code to free it
3674-
once it's sure the `x` won't be used again. This Rust code will do the same
3675-
thing as the following C code:
3672+
because Rust has a garbage collector -- it doesn't. Instead, when `x` goes out
3673+
of scope, Rust `free`s `x`. This Rust code will do the same thing as the
3674+
following C code:
36763675

36773676
```{c,ignore}
36783677
{

branches/auto/src/doc/rust.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,9 @@ use_decl : "pub" ? "use" [ path "as" ident
924924
925925
path_glob : ident [ "::" [ path_glob
926926
| '*' ] ] ?
927-
| '{' ident [ ',' ident ] * '}' ;
927+
| '{' path_item [ ',' path_item ] * '}' ;
928+
929+
path_item : ident | "mod" ;
928930
~~~~
929931

930932
A _use declaration_ creates one or more local name bindings synonymous
@@ -943,14 +945,18 @@ Use declarations support a number of convenient shortcuts:
943945
* Simultaneously binding a list of paths differing only in their final element,
944946
using the glob-like brace syntax `use a::b::{c,d,e,f};`
945947
* Binding all paths matching a given prefix, using the asterisk wildcard syntax `use a::b::*;`
948+
* Simultaneously binding a list of paths differing only in their final element
949+
and their immediate parent module, using the `mod` keyword, such as `use a::b::{mod, c, d};`
946950

947951
An example of `use` declarations:
948952

949953
~~~~
950954
use std::iter::range_step;
951955
use std::option::{Some, None};
956+
use std::collections::hashmap::{mod, HashMap};
952957
953958
# fn foo<T>(_: T){}
959+
# fn bar(map: HashMap<String, uint>, set: hashmap::HashSet<String>){}
954960
955961
fn main() {
956962
// Equivalent to 'std::iter::range_step(0u, 10u, 2u);'
@@ -959,6 +965,11 @@ fn main() {
959965
// Equivalent to 'foo(vec![std::option::Some(1.0f64),
960966
// std::option::None]);'
961967
foo(vec![Some(1.0f64), None]);
968+
969+
// Both `hash` and `HashMap` are in scope.
970+
let map = HashMap::new();
971+
let set = hashmap::HashSet::new();
972+
bar(map, set);
962973
}
963974
~~~~
964975

@@ -1790,7 +1801,7 @@ module through the rules above. It essentially allows public access into the
17901801
re-exported item. For example, this program is valid:
17911802

17921803
~~~~
1793-
pub use api = self::implementation;
1804+
pub use self::implementation as api;
17941805
17951806
mod implementation {
17961807
pub fn f() {}

branches/auto/src/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,7 +3112,7 @@ use farm::*;
31123112
However, that's not all. You can also rename an item while you're bringing it into scope:
31133113

31143114
~~~
3115-
use egg_layer = farm::chicken;
3115+
use farm::chicken as egg_layer;
31163116
# mod farm { pub fn chicken() { println!("Laying eggs is fun!") } }
31173117
// ...
31183118
@@ -3335,7 +3335,7 @@ you just have to import it with an `use` statement.
33353335
For example, it re-exports `range` which is defined in `std::iter::range`:
33363336

33373337
~~~
3338-
use iter_range = std::iter::range;
3338+
use std::iter::range as iter_range;
33393339
33403340
fn main() {
33413341
// `range` is imported by default

branches/auto/src/etc/emacs/rust-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
(defconst rust-mode-keywords
171171
'("as"
172172
"box" "break"
173-
"continue" "crate"
173+
"const" "continue" "crate"
174174
"do"
175175
"else" "enum" "extern"
176176
"false" "fn" "for"
@@ -182,7 +182,8 @@
182182
"self" "static" "struct" "super"
183183
"true" "trait" "type"
184184
"unsafe" "use"
185-
"while"))
185+
"virtual"
186+
"where" "while"))
186187

187188
(defconst rust-special-types
188189
'("u8" "i8"

branches/auto/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
<keyword>trait</keyword>
7272
<keyword>unsafe</keyword>
7373
<keyword>use</keyword>
74+
<keyword>virtual</keyword>
75+
<keyword>where</keyword>
7476
<keyword>while</keyword>
7577
</context>
7678

branches/auto/src/etc/kate/rust.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<item> as </item>
2020
<item> break </item>
2121
<item> box </item>
22+
<item> const </item>
2223
<item> continue </item>
2324
<item> crate </item>
2425
<item> do </item>
@@ -44,6 +45,8 @@
4445
<item> trait </item>
4546
<item> unsafe </item>
4647
<item> use </item>
48+
<item> virtual </item>
49+
<item> where </item>
4750
<item> while </item>
4851
</list>
4952
<list name="traits">

branches/auto/src/etc/vim/ftplugin/rust.vim

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ if exists("g:loaded_delimitMate")
5656
let b:delimitMate_excluded_regions = delimitMate#Get("excluded_regions") . ',rustLifetimeCandidate,rustGenericLifetimeCandidate'
5757
endif
5858

59+
if has("folding") && exists('g:rust_fold') && g:rust_fold != 0
60+
let b:rust_set_foldmethod=1
61+
setlocal foldmethod=syntax
62+
if g:rust_fold == 2
63+
setlocal foldlevel<
64+
else
65+
setlocal foldlevel=99
66+
endif
67+
endif
68+
5969
if has('conceal') && exists('g:rust_conceal')
6070
let b:rust_set_conceallevel=1
6171
setlocal conceallevel=2
@@ -108,6 +118,10 @@ let b:undo_ftplugin = "
108118
\|else
109119
\|unlet! b:delimitMate_excluded_regions
110120
\|endif
121+
\|if exists('b:rust_set_foldmethod')
122+
\|setlocal foldmethod< foldlevel<
123+
\|unlet b:rust_set_foldmethod
124+
\|endif
111125
\|if exists('b:rust_set_conceallevel')
112126
\|setlocal conceallevel<
113127
\|unlet b:rust_set_conceallevel

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@ elseif exists("b:current_syntax")
1111
finish
1212
endif
1313

14-
" Fold settings {{{1
15-
16-
if has("folding") && exists('g:rust_fold') && g:rust_fold != 0
17-
setlocal foldmethod=syntax
18-
if g:rust_fold == 2
19-
setlocal foldlevel<
20-
else
21-
setlocal foldlevel=99
22-
endif
23-
endif
24-
2514
" Syntax definitions {{{1
2615
" Basic keywords {{{2
2716
syn keyword rustConditional match if else
@@ -37,7 +26,7 @@ syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
3726
syn keyword rustKeyword for in if impl let
3827
syn keyword rustKeyword loop once proc pub
3928
syn keyword rustKeyword return super
40-
syn keyword rustKeyword unsafe virtual while
29+
syn keyword rustKeyword unsafe virtual where while
4130
syn keyword rustKeyword use nextgroup=rustModPath,rustModPathInUse skipwhite skipempty
4231
" FIXME: Scoped impl's name is also fallen in this category
4332
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
@@ -95,7 +84,7 @@ syn keyword rustEnumVariant Ok Err
9584
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr
9685
syn keyword rustTrait IntoBytes
9786
syn keyword rustTrait ToCStr
98-
syn keyword rustTrait Char
87+
syn keyword rustTrait Char UnicodeChar
9988
syn keyword rustTrait Clone
10089
syn keyword rustTrait PartialEq PartialOrd Eq Ord Equiv
10190
syn keyword rustEnum Ordering
@@ -113,18 +102,18 @@ syn keyword rustTrait Box
113102
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
114103
syn keyword rustTrait RawPtr
115104
syn keyword rustTrait Buffer Writer Reader Seek
116-
syn keyword rustTrait Str StrVector StrSlice OwnedStr
117-
syn keyword rustTrait IntoMaybeOwned StrAllocating
105+
syn keyword rustTrait Str StrVector StrSlice
106+
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrSlice
118107
syn keyword rustTrait ToString IntoStr
119108
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
120109
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
121110
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
122111
syn keyword rustTrait CloneableVector ImmutableCloneableVector
123-
syn keyword rustTrait MutableCloneableVector MutableOrdVector
124-
syn keyword rustTrait ImmutableVector MutableVector
125-
syn keyword rustTrait ImmutableEqVector ImmutableOrdVector
126-
syn keyword rustTrait Vector VectorVector
127-
syn keyword rustTrait MutableVectorAllocating
112+
syn keyword rustTrait MutableCloneableSlice MutableOrdSlice
113+
syn keyword rustTrait ImmutableSlice MutableSlice
114+
syn keyword rustTrait ImmutablePartialEqSlice ImmutableOrdSlice
115+
syn keyword rustTrait Slice VectorVector
116+
syn keyword rustTrait MutableSliceAllocating
128117
syn keyword rustTrait String
129118
syn keyword rustTrait Vec
130119

branches/auto/src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ extern crate libc;
8686

8787
#[deprecated = "use boxed instead"]
8888
#[cfg(not(test))]
89-
pub use owned = boxed;
89+
pub use boxed as owned;
9090

9191
// Heaps provided for low-level allocation strategies
9292

branches/auto/src/libcollections/bitv.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,11 @@ use core::default::Default;
6868
use core::fmt;
6969
use core::iter::{Chain, Enumerate, Repeat, Skip, Take};
7070
use core::iter;
71-
use core::ops::Index;
7271
use core::slice;
7372
use core::uint;
7473
use std::hash;
7574

76-
use {Collection, Mutable, Set, MutableSet, MutableSeq};
75+
use {Mutable, Set, MutableSet, MutableSeq};
7776
use vec::Vec;
7877

7978
type MatchWords<'a> = Chain<MaskWords<'a>, Skip<Take<Enumerate<Repeat<uint>>>>>;
@@ -1322,7 +1321,7 @@ impl BitvSet {
13221321
/// let a = BitvSet::from_bitv(bitv::from_bytes([0b01101000]));
13231322
/// let b = BitvSet::from_bitv(bitv::from_bytes([0b10100000]));
13241323
///
1325-
/// // Print 2, 4 in arbitrary order
1324+
/// // Print 1, 4 in arbitrary order
13261325
/// for x in a.difference(&b) {
13271326
/// println!("{}", x);
13281327
/// }

branches/auto/src/libcollections/btree.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
// btree.rs
1212
//
1313

14+
// NB. this is not deprecated for removal, just deprecating the
15+
// current implementation. If the major pain-points are addressed
16+
// (overuse of by-value self and .clone), this can be removed.
17+
#![deprecated = "the current implementation is extremely inefficient, \
18+
prefer a HashMap, TreeMap or TrieMap"]
19+
#![allow(deprecated)]
20+
1421
//! Starting implementation of a btree for rust.
1522
//! Structure inspired by github user davidhalperin's gist.
1623
@@ -24,7 +31,7 @@ use alloc::boxed::Box;
2431
use core::fmt;
2532
use core::fmt::Show;
2633

27-
use {Collection, MutableSeq};
34+
use MutableSeq;
2835
use vec::Vec;
2936

3037
#[allow(missing_doc)]

branches/auto/src/libcollections/dlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use core::mem;
3131
use core::ptr;
3232
use std::hash::{Writer, Hash};
3333

34-
use {Collection, Mutable, Deque, MutableSeq};
34+
use {Mutable, Deque, MutableSeq};
3535

3636
/// A doubly-linked list.
3737
pub struct DList<T> {

branches/auto/src/libcollections/hash/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ use core::mem;
7373
use vec::Vec;
7474

7575
/// Reexport the `sip::hash` function as our default hasher.
76-
pub use hash = self::sip::hash;
76+
pub use self::sip::hash as hash;
7777

7878
pub mod sip;
7979

branches/auto/src/libcollections/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222
html_playground_url = "http://play.rust-lang.org/")]
2323

2424
#![feature(macro_rules, managed_boxes, default_type_params, phase, globs)]
25-
#![feature(unsafe_destructor)]
25+
#![feature(unsafe_destructor, import_shadowing)]
2626
#![no_std]
2727

28+
// NOTE(stage0, pcwalton): Remove after snapshot.
29+
#![allow(unknown_features)]
30+
2831
#[phase(plugin, link)] extern crate core;
2932
extern crate unicode;
3033
extern crate alloc;
@@ -36,11 +39,11 @@ extern crate alloc;
3639
#[cfg(test)] #[phase(plugin, link)] extern crate std;
3740
#[cfg(test)] #[phase(plugin, link)] extern crate log;
3841

39-
use core::prelude::*;
42+
use core::prelude::Option;
4043

41-
pub use core::collections::Collection;
4244
pub use bitv::{Bitv, BitvSet};
4345
pub use btree::BTree;
46+
pub use core::prelude::Collection;
4447
pub use dlist::DList;
4548
pub use enum_set::EnumSet;
4649
pub use priority_queue::PriorityQueue;

branches/auto/src/libcollections/priority_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ use core::default::Default;
154154
use core::mem::{zeroed, replace, swap};
155155
use core::ptr;
156156

157-
use {Collection, Mutable, MutableSeq};
157+
use {Mutable, MutableSeq};
158158
use slice;
159159
use vec::Vec;
160160

branches/auto/src/libcollections/ringbuf.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ use core::prelude::*;
1818
use core::cmp;
1919
use core::default::Default;
2020
use core::fmt;
21-
use core::iter::RandomAccessIterator;
2221
use core::iter;
2322
use std::hash::{Writer, Hash};
2423

25-
use {Deque, Collection, Mutable, MutableSeq};
24+
use {Deque, Mutable, MutableSeq};
2625
use vec::Vec;
2726

2827
static INITIAL_CAPACITY: uint = 8u; // 2^3

0 commit comments

Comments
 (0)