Skip to content

Commit 691d21d

Browse files
committed
---
yaml --- r: 166861 b: refs/heads/master c: 2881953 h: refs/heads/master i: 166859: 5c06e38 v: v3
1 parent 92d5cd6 commit 691d21d

File tree

158 files changed

+1405
-2296
lines changed

Some content is hidden

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

158 files changed

+1405
-2296
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: b31926d1156b6010497b75858d4e4f518de0006e
2+
refs/heads/master: 288195370c0b033f0c8540b5e4b65a45adb850da
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 023dfb0c898d851dee6ace2f8339b73b5287136b
55
refs/heads/try: f5d619caf9f32458680fae55526b99582ca682dd

trunk/mk/crates.mk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,7 @@ DOC_CRATES := $(filter-out rustc, \
122122
$(filter-out rustc_borrowck, \
123123
$(filter-out rustc_resolve, \
124124
$(filter-out rustc_driver, \
125-
$(filter-out log, \
126-
$(filter-out regex, \
127-
$(filter-out regex_macros, \
128-
$(filter-out getopts, \
129-
$(filter-out time, \
130-
$(filter-out syntax, $(CRATES)))))))))))))
125+
$(filter-out syntax, $(CRATES))))))))
131126
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
132127
rustc_typeck rustc_driver syntax
133128

trunk/mk/docs.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ LIB_DOC_DEP_$(1) = \
236236
$$(RSINPUTS_$(1)) \
237237
$$(RUSTDOC_EXE) \
238238
$$(foreach dep,$$(RUST_DEPS_$(1)), \
239-
$$(TLIB2_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.$$(dep)) \
240-
$$(foreach dep,$$(filter $$(DOC_CRATES), $$(RUST_DEPS_$(1))), \
239+
$$(TLIB2_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.$$(dep) \
241240
doc/$$(dep)/)
242241
else
243242
LIB_DOC_DEP_$(1) = $$(CRATEFILE_$(1)) $$(RSINPUTS_$(1))

trunk/mk/grammar.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $(BG):
3131
$(Q)mkdir -p $(BG)
3232

3333
$(BG)RustLexer.class: $(BG) $(SG)RustLexer.g4
34-
$(Q)$(CFG_ANTLR4) -o $(B)grammar $(SG)RustLexer.g4
34+
$(Q)$(CFG_ANTLR4) -o $(BG) $(SG)RustLexer.g4
3535
$(Q)$(CFG_JAVAC) -d $(BG) $(BG)RustLexer.java
3636

3737
check-build-lexer-verifier: $(BG)verify

trunk/mk/tests.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ endif
7474
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
7575
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
7676

77+
# If we're sharding the testsuite between parallel testers,
78+
# pass this argument along to the compiletest and crate test
79+
# invocations.
80+
ifdef TEST_SHARD
81+
CTEST_TESTARGS += --test-shard=$(TEST_SHARD)
82+
CRATE_TEST_EXTRA_ARGS += --test-shard=$(TEST_SHARD)
83+
endif
84+
7785
define DEF_TARGET_COMMANDS
7886

7987
ifdef CFG_UNIXY_$(1)

trunk/src/doc/guide.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,10 @@ let a = [1i, 2i, 3i]; // a: [int, ..3]
16041604
let mut m = [1i, 2i, 3i]; // mut m: [int, ..3]
16051605
```
16061606

1607+
You can create an array with a given number of elements, all initialized to the
1608+
same value, with `[val, ..N]` syntax. The compiler ensures that arrays are
1609+
always initialized.
1610+
16071611
There's a shorthand for initializing each element of an array to the same
16081612
value. In this example, each element of `a` will be initialized to `0i`:
16091613

@@ -1891,7 +1895,7 @@ authors = ["Your Name <[email protected]>"]
18911895
Cargo gets this information from your environment. If it's not correct, go ahead
18921896
and fix that.
18931897

1894-
Finally, Cargo generated a "Hello, world!" for us. Check out `src/main.rs`:
1898+
Finally, Cargo generated a hello, world for us. Check out `src/main.rs`:
18951899

18961900
```{rust}
18971901
fn main() {

trunk/src/doc/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ fn main() {
483483
for i in range(0u, 3u) {
484484
let number = numbers.clone();
485485
Thread::spawn(move || {
486-
let mut array = number.lock().unwrap();
486+
let mut array = number.lock();
487487
488488
(*array)[i] += 1;
489489

trunk/src/etc/kate/rust.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@
245245
<context attribute="CharEscape" lineEndContext="#pop" name="CharEscape">
246246
<AnyChar String="nrt\&apos;&quot;" attribute="CharEscape" context="#pop"/>
247247
<RegExpr String="x[0-9a-fA-F]{2}" attribute="CharEscape" context="#pop"/>
248-
<RegExpr String="u\{[0-9a-fA-F]{1,6}\}" attribute="CharEscape" context="#pop"/>
249248
<RegExpr String="u[0-9a-fA-F]{4}" attribute="CharEscape" context="#pop"/>
250249
<RegExpr String="U[0-9a-fA-F]{8}" attribute="CharEscape" context="#pop"/>
251250
<RegExpr String="." attribute="Error" context="#pop"/>
@@ -256,7 +255,7 @@
256255
<Detect2Chars char="*" char1="/" attribute="Comment" context="#pop" endRegion="Comment"/>
257256
</context>
258257
</contexts>
259-
<itemDatas>
258+
<itemDatas>
260259
<itemData name="Normal Text" defStyleNum="dsNormal"/>
261260
<itemData name="Keyword" defStyleNum="dsKeyword" color="#770088" bold="1"/>
262261
<itemData name="Self" defStyleNum="dsKeyword" color="#FF0000" bold="1"/>

trunk/src/liballoc/arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
//! let five = five.clone();
5959
//!
6060
//! Thread::spawn(move || {
61-
//! let mut number = five.lock().unwrap();
61+
//! let mut number = five.lock();
6262
//!
6363
//! *number += 1;
6464
//!
@@ -80,7 +80,7 @@ use core::nonzero::NonZero;
8080
use core::ops::{Drop, Deref};
8181
use core::option::Option;
8282
use core::option::Option::{Some, None};
83-
use core::ptr::{mod, PtrExt};
83+
use core::ptr::{mod, RawPtr};
8484
use heap::deallocate;
8585

8686
/// An atomically reference counted wrapper for shared state.
@@ -722,7 +722,7 @@ mod tests {
722722

723723
let a = Arc::new(Cycle { x: Mutex::new(None) });
724724
let b = a.clone().downgrade();
725-
*a.x.lock().unwrap() = Some(b);
725+
*a.x.lock() = Some(b);
726726

727727
// hopefully we don't double-free (or leak)...
728728
}

trunk/src/liballoc/heap.rs

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

11-
use core::ptr::PtrExt;
11+
use core::ptr::RawPtr;
1212

1313
// FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias`
1414

@@ -371,7 +371,7 @@ mod imp {
371371
mod test {
372372
extern crate test;
373373
use self::test::Bencher;
374-
use core::ptr::PtrExt;
374+
use core::ptr::RawPtr;
375375
use heap;
376376

377377
#[test]

trunk/src/liballoc/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ use core::nonzero::NonZero;
154154
use core::ops::{Deref, Drop};
155155
use core::option::Option;
156156
use core::option::Option::{Some, None};
157-
use core::ptr::{mod, PtrExt};
157+
use core::ptr::{mod, RawPtr};
158158
use core::result::Result;
159159
use core::result::Result::{Ok, Err};
160160

trunk/src/libcollections/dlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<T> Rawlink<T> {
9595
/// Convert the `Rawlink` into an Option value
9696
fn resolve_immut<'a>(&self) -> Option<&'a T> {
9797
unsafe {
98-
mem::transmute(self.p.as_ref())
98+
self.p.as_ref()
9999
}
100100
}
101101

trunk/src/libcollections/ring_buf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ impl<T> RingBuf<T> {
453453

454454
if contiguous {
455455
let (empty, buf) = buf.split_at_mut(0);
456-
(buf.slice_mut(tail, head), empty)
456+
(buf[mut tail..head], empty)
457457
} else {
458458
let (mid, right) = buf.split_at_mut(tail);
459459
let (left, _) = mid.split_at_mut(head);

trunk/src/libcollections/slice.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ use core::iter::{range_step, MultiplicativeIterator};
9494
use core::kinds::Sized;
9595
use core::mem::size_of;
9696
use core::mem;
97-
use core::ops::{FnMut,SliceMut};
97+
use core::ops::FnMut;
9898
use core::prelude::{Clone, Greater, Iterator, IteratorExt, Less, None, Option};
99-
use core::prelude::{Ord, Ordering, PtrExt, Some, range};
99+
use core::prelude::{Ord, Ordering, RawPtr, Some, range};
100100
use core::ptr;
101101
use core::slice as core_slice;
102102
use self::Direction::*;
@@ -1110,7 +1110,7 @@ impl<T> SliceExt<T> for [T] {
11101110

11111111
#[inline]
11121112
fn move_from(&mut self, mut src: Vec<T>, start: uint, end: uint) -> uint {
1113-
for (a, b) in self.iter_mut().zip(src.slice_mut(start, end).iter_mut()) {
1113+
for (a, b) in self.iter_mut().zip(src[mut start..end].iter_mut()) {
11141114
mem::swap(a, b);
11151115
}
11161116
cmp::min(self.len(), end-start)
@@ -1326,7 +1326,7 @@ impl<T> BorrowFrom<Vec<T>> for [T] {
13261326

13271327
#[unstable = "trait is unstable"]
13281328
impl<T> BorrowFromMut<Vec<T>> for [T] {
1329-
fn borrow_from_mut(owned: &mut Vec<T>) -> &mut [T] { owned.as_mut_slice_() }
1329+
fn borrow_from_mut(owned: &mut Vec<T>) -> &mut [T] { owned[mut] }
13301330
}
13311331

13321332
#[unstable = "trait is unstable"]
@@ -2491,14 +2491,14 @@ mod tests {
24912491
assert!(a == [7i,2,3,4]);
24922492
let mut a = [1i,2,3,4,5];
24932493
let b = vec![5i,6,7,8,9,0];
2494-
assert_eq!(a.slice_mut(2, 4).move_from(b,1,6), 2);
2494+
assert_eq!(a[mut 2..4].move_from(b,1,6), 2);
24952495
assert!(a == [1i,2,6,7,5]);
24962496
}
24972497

24982498
#[test]
24992499
fn test_reverse_part() {
25002500
let mut values = [1i,2,3,4,5];
2501-
values.slice_mut(1, 4).reverse();
2501+
values[mut 1..4].reverse();
25022502
assert!(values == [1,4,3,2,5]);
25032503
}
25042504

@@ -2545,9 +2545,9 @@ mod tests {
25452545
fn test_bytes_set_memory() {
25462546
use slice::bytes::MutableByteVector;
25472547
let mut values = [1u8,2,3,4,5];
2548-
values.slice_mut(0, 5).set_memory(0xAB);
2548+
values[mut 0..5].set_memory(0xAB);
25492549
assert!(values == [0xAB, 0xAB, 0xAB, 0xAB, 0xAB]);
2550-
values.slice_mut(2, 4).set_memory(0xFF);
2550+
values[mut 2..4].set_memory(0xFF);
25512551
assert!(values == [0xAB, 0xAB, 0xFF, 0xFF, 0xAB]);
25522552
}
25532553

0 commit comments

Comments
 (0)