Skip to content

Commit c808382

Browse files
committed
---
yaml --- r: 52714 b: refs/heads/dist-snap c: 743c1c3 h: refs/heads/master v: v3
1 parent bb25735 commit c808382

File tree

6 files changed

+15
-18
lines changed

6 files changed

+15
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 0336a8633f0734ef269c000c5d7432b7a706a1fe
10+
refs/heads/dist-snap: 743c1c37e87835cbc7e9a5b5daff7ff9f71e9fe6
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/rust.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,15 +1716,12 @@ vec_elems : [expr [',' expr]*] | [expr ',' ".." expr]
17161716

17171717
A [_vector_](#vector-types) _expression_ is written by enclosing zero or
17181718
more comma-separated expressions of uniform type in square brackets.
1719-
The keyword `mut` can be written after the opening bracket to
1720-
indicate that the elements of the resulting vector may be mutated.
1721-
When no mutability is specified, the vector is immutable.
17221719

17231720
~~~~
17241721
[1, 2, 3, 4];
17251722
["a", "b", "c", "d"];
17261723
[0, ..128]; // vector with 128 zeros
1727-
[mut 0u8, 0u8, 0u8, 0u8];
1724+
[0u8, 0u8, 0u8, 0u8];
17281725
~~~~
17291726

17301727
### Index expressions
@@ -1746,7 +1743,7 @@ task in a _failing state_.
17461743
# do task::spawn_unlinked {
17471744
17481745
([1, 2, 3, 4])[0];
1749-
([mut 'x', 'y'])[1] = 'z';
1746+
(['x', 'y'])[1] = 'z';
17501747
(["a", "b"])[10]; // fails
17511748
17521749
# }
@@ -1909,8 +1906,8 @@ No allocation or destruction is entailed.
19091906
An example of three different swap expressions:
19101907

19111908
~~~~~~~~
1912-
# let mut x = &[mut 0];
1913-
# let mut a = &[mut 0];
1909+
# let mut x = &[0];
1910+
# let mut a = &[0];
19141911
# let i = 0;
19151912
# let y = {mut z: 0};
19161913
# let b = {mut c: 0};
@@ -2005,11 +2002,11 @@ the unary copy operator is typically only used to cause an argument to a functio
20052002
An example of a copy expression:
20062003

20072004
~~~~
2008-
fn mutate(vec: ~[mut int]) {
2005+
fn mutate(vec: ~[int]) {
20092006
vec[0] = 10;
20102007
}
20112008
2012-
let v = ~[mut 1,2,3];
2009+
let v = ~[1,2,3];
20132010
20142011
mutate(copy v); // Pass a copy
20152012

branches/dist-snap/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ Generic `type`, `struct`, and `enum` declarations follow the same pattern:
17951795
type Set<T> = HashMap<T, ()>;
17961796
17971797
struct Stack<T> {
1798-
elements: ~[mut T]
1798+
elements: ~[T]
17991799
}
18001800
18011801
enum Option<T> {

branches/dist-snap/src/libcore/vec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,12 @@ pub pure fn view<T>(v: &r/[T], start: uint, end: uint) -> &r/[T] {
280280
}
281281

282282
/// Return a slice that points into another slice.
283+
<<<<<<< HEAD
283284
#[inline(always)]
284285
pub pure fn mut_view<T>(v: &r/[mut T], start: uint, end: uint) -> &r/[mut T] {
286+
=======
287+
pub pure fn mut_view<T>(v: &mut r/[T], start: uint, end: uint) -> &mut r/[T] {
288+
>>>>>>> RIMOV, round 11
285289
assert (start <= end);
286290
assert (end <= len(v));
287291
do as_mut_buf(v) |p, _len| {
@@ -2199,12 +2203,8 @@ pub mod bytes {
21992203
* Copies `count` bytes from `src` to `dst`. The source and destination
22002204
* may overlap.
22012205
*/
2202-
<<<<<<< HEAD
22032206
#[inline(always)]
2204-
pub fn copy_memory(dst: &[mut u8], src: &[const u8], count: uint) {
2205-
=======
22062207
pub fn copy_memory(dst: &mut [u8], src: &[const u8], count: uint) {
2207-
>>>>>>> RIMOV, round 5
22082208
// Bound checks are done at vec::raw::copy_memory.
22092209
unsafe { vec::raw::copy_memory(dst, src, count) }
22102210
}

branches/dist-snap/src/libfuzzer/cycles.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn empty_pointy() -> @pointy {
5858
mut g : fn~()->(){},
5959

6060
mut m : ~[],
61-
mut n : ~[mut],
61+
mut n : ~[],
6262
mut o : {x : 0, y : none}
6363
}
6464
}

branches/dist-snap/src/test/compile-fail/regions-infer-invariance-due-to-mutability-2.rs

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

1111
struct invariant {
12-
f: @[mut &int]
12+
f: @mut [&int]
1313
}
1414

1515
fn to_same_lifetime(bi: invariant/&r) {
@@ -25,4 +25,4 @@ fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
2525
}
2626

2727
fn main() {
28-
}
28+
}

0 commit comments

Comments
 (0)