Skip to content

Commit 932de19

Browse files
committed
---
yaml --- r: 92262 b: refs/heads/auto c: 667d114 h: refs/heads/master v: v3
1 parent 381b8a8 commit 932de19

File tree

228 files changed

+1936
-2778
lines changed

Some content is hidden

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

228 files changed

+1936
-2778
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: ae3078ca257fe39a7fdc84bdfb81778b2542c520
16+
refs/heads/auto: 667d114f47ae658894c496dbf07a8d29c737c877
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/doc/rust.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,12 +486,14 @@ include:
486486
* `fmt!` : format data into a string
487487
* `env!` : look up an environment variable's value at compile time
488488
* `stringify!` : pretty-print the Rust expression given as an argument
489+
* `proto!` : define a protocol for inter-task communication
489490
* `include!` : include the Rust expression in the given file
490491
* `include_str!` : include the contents of the given file as a string
491492
* `include_bin!` : include the contents of the given file as a binary blob
492493
* `error!`, `warn!`, `info!`, `debug!` : provide diagnostic information.
493494

494-
All of the above extensions are expressions with values.
495+
All of the above extensions, with the exception of `proto!`, are expressions
496+
with values. `proto!` is an item, defining a new name.
495497

496498
## Macros
497499

@@ -1237,9 +1239,9 @@ static BIT2: uint = 1 << 1;
12371239
static BITS: [uint, ..2] = [BIT1, BIT2];
12381240
static STRING: &'static str = "bitstring";
12391241
1240-
struct BitsNStrings<'a> {
1242+
struct BitsNStrings<'self> {
12411243
mybits: [uint, ..2],
1242-
mystring: &'a str
1244+
mystring: &'self str
12431245
}
12441246
12451247
static bits_n_strings: BitsNStrings<'static> = BitsNStrings {
@@ -2279,7 +2281,7 @@ The following are examples of structure expressions:
22792281
~~~~
22802282
# struct Point { x: f64, y: f64 }
22812283
# struct TuplePoint(f64, f64);
2282-
# mod game { pub struct User<'a> { name: &'a str, age: uint, score: uint } }
2284+
# mod game { pub struct User<'self> { name: &'self str, age: uint, score: uint } }
22832285
# struct Cookie; fn some_fn<T>(t: T) {}
22842286
Point {x: 10.0, y: 20.0};
22852287
TuplePoint(10.0, 20.0);
@@ -3053,7 +3055,7 @@ order specified by the tuple type.
30533055
An example of a tuple type and its use:
30543056

30553057
~~~~
3056-
type Pair<'a> = (int,&'a str);
3058+
type Pair<'self> = (int,&'self str);
30573059
let p: Pair<'static> = (10,"hello");
30583060
let (a, b) = p;
30593061
assert!(b != "world");
@@ -3218,7 +3220,7 @@ fn add(x: int, y: int) -> int {
32183220
32193221
let mut x = add(5,7);
32203222
3221-
type Binop<'a> = 'a |int,int| -> int;
3223+
type Binop<'self> = 'self |int,int| -> int;
32223224
let bo: Binop = add;
32233225
x = bo(5,7);
32243226
~~~~

branches/auto/doc/rustdoc.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,8 @@ pub fn recalibrate() {
3838
}
3939
~~~
4040

41-
Doc comments are markdown, and are currently parsed with the
42-
[sundown][sundown] library. rustdoc does not yet do any fanciness such as
43-
referencing other items inline, like javadoc's `@see`. One exception to this
44-
is that the first paragrah will be used as the "summary" of an item in the
45-
generated documentation:
46-
47-
~~~
48-
/// A whizbang. Does stuff. (this line is the summary)
49-
///
50-
/// Whizbangs are ...
51-
struct Whizbang;
52-
~~~
53-
54-
To generate the docs, run `rustdoc universe.rs`. By default, it generates a
55-
directory called `doc`, with the documentation for `universe` being in
41+
Then, one can run `rustdoc universe.rs`. By default, it generates a directory
42+
called `doc`, with the documentation for `universe` being in
5643
`doc/universe/index.html`. If you are using other crates with `extern mod`,
5744
rustdoc will even link to them when you use their types, as long as their
5845
documentation has already been generated by a previous run of rustdoc, or the
@@ -83,5 +70,3 @@ color, and one can always click on a colored type to jump to its
8370
documentation. There is a search bar at the top, which is powered by some
8471
javascript and a statically-generated search index. No special web server is
8572
required for the search.
86-
87-
[sundown]: https://github.com/vmg/sundown/

branches/auto/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3235,7 +3235,7 @@ more out of date than this document.
32353235
[container]: tutorial-container.html
32363236
[conditions]: tutorial-conditions.html
32373237
[rustpkg]: tutorial-rustpkg.html
3238-
[rustdoc]: rustdoc.html
3238+
[rustdoc]: tutorial-rustdoc.html
32393239

32403240
[wiki]: https://github.com/mozilla/rust/wiki/Docs
32413241
[wiki-packages]: https://github.com/mozilla/rust/wiki/Doc-packages,-editors,-and-other-tools

branches/auto/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ CFG_GCCISH_DEF_FLAG_arm-unknown-linux-gnueabi := -Wl,--export-dynamic,--dynamic-
350350
CFG_GCCISH_PRE_LIB_FLAGS_arm-unknown-linux-gnueabi := -Wl,-whole-archive
351351
CFG_GCCISH_POST_LIB_FLAGS_arm-unknown-linux-gnueabi := -Wl,-no-whole-archive
352352
CFG_DEF_SUFFIX_arm-unknown-linux-gnueabi := .linux.def
353-
CFG_INSTALL_NAME_arm-unknown-linux-gnueabi =
353+
CFG_INSTALL_NAME_ar,-unknown-linux-gnueabi =
354354
CFG_LIBUV_LINK_FLAGS_arm-unknown-linux-gnueabi =
355355
CFG_EXE_SUFFIX_arm-unknown-linux-gnueabi :=
356356
CFG_WINDOWSY_arm-unknown-linux-gnueabi :=

branches/auto/src/compiletest/errors.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
1919
let mut error_patterns = ~[];
2020
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
2121
let mut line_num = 1u;
22-
for ln in rdr.lines() {
22+
loop {
23+
let ln = match rdr.read_line() {
24+
Some(ln) => ln, None => break,
25+
};
2326
error_patterns.push_all_move(parse_expected(line_num, ln));
2427
line_num += 1u;
2528
}

branches/auto/src/compiletest/header.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ fn iter_header(testfile: &Path, it: |&str| -> bool) -> bool {
107107
use std::io::File;
108108

109109
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
110-
for ln in rdr.lines() {
110+
loop {
111+
let ln = match rdr.read_line() {
112+
Some(ln) => ln, None => break
113+
};
114+
111115
// Assume that any directives will be found before the first
112116
// module or function. This doesn't seem to be an optimization
113117
// with a warm page cache. Maybe with a cold one.

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: Patrick Walton <[email protected]>
44
" Maintainer: Ben Blum <[email protected]>
55
" Maintainer: Chris Morgan <[email protected]>
6-
" Last Change: 2013 Dec 10
6+
" Last Change: 2013 Dec 04
77

88
if version < 600
99
syntax clear
@@ -19,23 +19,23 @@ syn keyword rustOperator as
1919
syn match rustAssert "\<assert\(\w\)*!" contained
2020
syn match rustFail "\<fail\(\w\)*!" contained
2121
syn keyword rustKeyword break continue do extern
22-
syn keyword rustKeyword for in if impl let
23-
syn keyword rustKeyword loop once priv pub
22+
syn keyword rustKeyword in if impl let log
23+
syn keyword rustKeyword for impl let log
24+
syn keyword rustKeyword loop mod once priv pub
2425
syn keyword rustKeyword return
2526
syn keyword rustKeyword unsafe while
2627
syn keyword rustKeyword use nextgroup=rustModPath skipwhite
2728
" FIXME: Scoped impl's name is also fallen in this category
2829
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite
2930
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite
3031
syn keyword rustKeyword proc
31-
syn keyword rustStorage mut ref static
32-
syn keyword rustObsoleteStorage const
32+
syn keyword rustStorage const mut ref static
3333

3434
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
3535
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
3636

3737
" Reserved (but not yet used) keywords {{{2
38-
syn keyword rustReservedKeyword alignof be offsetof pure sizeof typeof yield
38+
syn keyword rustKeyword alignof be offsetof pure sizeof typeof yield
3939

4040
" Built-in types {{{2
4141
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
@@ -160,15 +160,14 @@ syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(8\|16\|32\|64
160160
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
161161
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
162162

163-
" Special case for numbers of the form "1." which are float literals, unless followed by
164-
" an identifier, which makes them integer literals with a method call or field access.
165-
" (This must go first so the others take precedence.)
166-
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\@!"
167-
" To mark a number as a normal float, it must have at least one of the three things integral values don't have:
163+
" To mark it as a float, it must have at least one of the three things integral values don't have:
168164
" a decimal point and more numbers; an exponent; and a type suffix.
169165
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
170166
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\(f32\|f64\)\="
171167
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)"
168+
" Special case for numbers of the form "1." which are float literals, unless followed by
169+
" an identifier, which makes them integer literals with a method call or field access.
170+
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\@!"
172171

173172
" For the benefit of delimitMate
174173
syn region rustLifetimeCandidate display start=/&'\%(\([^'\\]\|\\\(['nrt0\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'\)\@!/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime
@@ -228,7 +227,6 @@ hi def link rustSelf Constant
228227
hi def link rustFloat Float
229228
hi def link rustOperator Operator
230229
hi def link rustKeyword Keyword
231-
hi def link rustReservedKeyword Error
232230
hi def link rustConditional Conditional
233231
hi def link rustIdentifier Identifier
234232
hi def link rustCapsIdent rustIdentifier
@@ -249,7 +247,6 @@ hi def link rustTodo Todo
249247
hi def link rustAttribute PreProc
250248
hi def link rustDeriving PreProc
251249
hi def link rustStorage StorageClass
252-
hi def link rustObsoleteStorage Error
253250
hi def link rustLifetime Special
254251

255252
" Other Suggestions:

branches/auto/src/libextra/arc.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ use std::task;
4949
use std::borrow;
5050

5151
/// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
52-
pub struct Condvar<'a> {
52+
pub struct Condvar<'self> {
5353
priv is_mutex: bool,
54-
priv failed: &'a mut bool,
55-
priv cond: &'a sync::Condvar<'a>
54+
priv failed: &'self mut bool,
55+
priv cond: &'self sync::Condvar<'self>
5656
}
5757

58-
impl<'a> Condvar<'a> {
58+
impl<'self> Condvar<'self> {
5959
/// Atomically exit the associated Arc and block until a signal is sent.
6060
#[inline]
6161
pub fn wait(&self) { self.wait_on(0) }
@@ -523,19 +523,19 @@ fn borrow_rwlock<T:Freeze + Send>(state: *mut RWArcInner<T>) -> *RWLock {
523523
}
524524

525525
/// The "write permission" token used for RWArc.write_downgrade().
526-
pub struct RWWriteMode<'a, T> {
527-
priv data: &'a mut T,
528-
priv token: sync::RWLockWriteMode<'a>,
526+
pub struct RWWriteMode<'self, T> {
527+
priv data: &'self mut T,
528+
priv token: sync::RWLockWriteMode<'self>,
529529
priv poison: PoisonOnFail,
530530
}
531531

532532
/// The "read permission" token used for RWArc.write_downgrade().
533-
pub struct RWReadMode<'a, T> {
534-
priv data: &'a T,
535-
priv token: sync::RWLockReadMode<'a>,
533+
pub struct RWReadMode<'self, T> {
534+
priv data: &'self T,
535+
priv token: sync::RWLockReadMode<'self>,
536536
}
537537

538-
impl<'a, T:Freeze + Send> RWWriteMode<'a, T> {
538+
impl<'self, T:Freeze + Send> RWWriteMode<'self, T> {
539539
/// Access the pre-downgrade RWArc in write mode.
540540
pub fn write<U>(&mut self, blk: |x: &mut T| -> U) -> U {
541541
match *self {
@@ -574,7 +574,7 @@ impl<'a, T:Freeze + Send> RWWriteMode<'a, T> {
574574
}
575575
}
576576

577-
impl<'a, T:Freeze + Send> RWReadMode<'a, T> {
577+
impl<'self, T:Freeze + Send> RWReadMode<'self, T> {
578578
/// Access the post-downgrade rwlock in read mode.
579579
pub fn read<U>(&self, blk: |x: &T| -> U) -> U {
580580
match *self {

branches/auto/src/libextra/base64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub trait ToBase64 {
5656
fn to_base64(&self, config: Config) -> ~str;
5757
}
5858

59-
impl<'a> ToBase64 for &'a [u8] {
59+
impl<'self> ToBase64 for &'self [u8] {
6060
/**
6161
* Turn a vector of `u8` bytes into a base64 string.
6262
*
@@ -157,7 +157,7 @@ pub trait FromBase64 {
157157
fn from_base64(&self) -> Result<~[u8], ~str>;
158158
}
159159

160-
impl<'a> FromBase64 for &'a str {
160+
impl<'self> FromBase64 for &'self str {
161161
/**
162162
* Convert any base64 encoded string (literal, `@`, `&`, or `~`)
163163
* to the byte values it encodes.

branches/auto/src/libextra/bitv.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,13 @@ fn iterate_bits(base: uint, bits: uint, f: |uint| -> bool) -> bool {
578578
}
579579

580580
/// An iterator for `Bitv`.
581-
pub struct BitvIterator<'a> {
582-
priv bitv: &'a Bitv,
581+
pub struct BitvIterator<'self> {
582+
priv bitv: &'self Bitv,
583583
priv next_idx: uint,
584584
priv end_idx: uint,
585585
}
586586

587-
impl<'a> Iterator<bool> for BitvIterator<'a> {
587+
impl<'self> Iterator<bool> for BitvIterator<'self> {
588588
#[inline]
589589
fn next(&mut self) -> Option<bool> {
590590
if self.next_idx != self.end_idx {
@@ -602,7 +602,7 @@ impl<'a> Iterator<bool> for BitvIterator<'a> {
602602
}
603603
}
604604

605-
impl<'a> DoubleEndedIterator<bool> for BitvIterator<'a> {
605+
impl<'self> DoubleEndedIterator<bool> for BitvIterator<'self> {
606606
#[inline]
607607
fn next_back(&mut self) -> Option<bool> {
608608
if self.next_idx != self.end_idx {
@@ -614,9 +614,9 @@ impl<'a> DoubleEndedIterator<bool> for BitvIterator<'a> {
614614
}
615615
}
616616

617-
impl<'a> ExactSize<bool> for BitvIterator<'a> {}
617+
impl<'self> ExactSize<bool> for BitvIterator<'self> {}
618618

619-
impl<'a> RandomAccessIterator<bool> for BitvIterator<'a> {
619+
impl<'self> RandomAccessIterator<bool> for BitvIterator<'self> {
620620
#[inline]
621621
fn indexable(&self) -> uint {
622622
self.end_idx - self.next_idx
@@ -903,12 +903,12 @@ impl BitvSet {
903903
}
904904
}
905905

906-
pub struct BitvSetIterator<'a> {
907-
priv set: &'a BitvSet,
906+
pub struct BitvSetIterator<'self> {
907+
priv set: &'self BitvSet,
908908
priv next_idx: uint
909909
}
910910

911-
impl<'a> Iterator<uint> for BitvSetIterator<'a> {
911+
impl<'self> Iterator<uint> for BitvSetIterator<'self> {
912912
#[inline]
913913
fn next(&mut self) -> Option<uint> {
914914
while self.next_idx < self.set.capacity() {

0 commit comments

Comments
 (0)