Skip to content

Commit cd44ab0

Browse files
committed
---
yaml --- r: 185085 b: refs/heads/snap-stage3 c: a1396d2 h: refs/heads/master i: 185083: de7c207 v: v3
1 parent 6021658 commit cd44ab0

File tree

113 files changed

+969
-1334
lines changed

Some content is hidden

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

113 files changed

+969
-1334
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: f0f7ca27de6b4e03f30012656dad270cda55a363
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 13efa529462a0f12bb0ffba7ed1ea58925e6a1b7
4+
refs/heads/snap-stage3: a1396d250ad5b1b7e9143a6a844ed7ba40bd0e55
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/doc/reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ fn needs_foo_or_bar() {
21652165
21662166
// This function is only included when compiling for a unixish OS with a 32-bit
21672167
// architecture
2168-
#[cfg(all(unix, target_pointer_width = "32"))]
2168+
#[cfg(all(unix, target_word_size = "32"))]
21692169
fn on_32bit_unix() {
21702170
// ...
21712171
}
@@ -2193,9 +2193,9 @@ The following configurations must be defined by the implementation:
21932193
* `target_os = "..."`. Operating system of the target, examples include
21942194
`"win32"`, `"macos"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"`,
21952195
`"bitrig"` or `"openbsd"`.
2196-
* `target_pointer_width = "..."`. Target pointer width in bits. This is set
2197-
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
2198-
64-bit pointers.
2196+
* `target_word_size = "..."`. Target word size in bits. This is set to `"32"`
2197+
for targets with 32-bit pointers, and likewise set to `"64"` for 64-bit
2198+
pointers.
21992199
* `unix`. See `target_family`.
22002200
* `windows`. See `target_family`.
22012201

branches/snap-stage3/src/doc/rust.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
/* General structure */
5757

5858
body {
59-
background-color: white;
6059
margin: 0 auto;
6160
padding: 0 15px;
6261
font-family: "Source Serif Pro", Georgia, Times, "Times New Roman", serif;

branches/snap-stage3/src/doc/trpl/pointers.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -361,16 +361,16 @@ duration a *lifetime*. Let's try a more complex example:
361361

362362
```{rust}
363363
fn main() {
364-
let mut x = 5;
364+
let x = &mut 5;
365365
366-
if x < 10 {
366+
if *x < 10 {
367367
let y = &x;
368368
369369
println!("Oh no: {}", y);
370370
return;
371371
}
372372
373-
x -= 1;
373+
*x -= 1;
374374
375375
println!("Oh no: {}", x);
376376
}
@@ -382,18 +382,17 @@ mutated, and therefore, lets us pass. This wouldn't work:
382382

383383
```{rust,ignore}
384384
fn main() {
385-
let mut x = 5;
385+
let x = &mut 5;
386386
387-
if x < 10 {
387+
if *x < 10 {
388388
let y = &x;
389-
390-
x -= 1;
389+
*x -= 1;
391390
392391
println!("Oh no: {}", y);
393392
return;
394393
}
395394
396-
x -= 1;
395+
*x -= 1;
397396
398397
println!("Oh no: {}", x);
399398
}
@@ -402,12 +401,12 @@ fn main() {
402401
It gives this error:
403402

404403
```text
405-
test.rs:7:9: 7:15 error: cannot assign to `x` because it is borrowed
406-
test.rs:7 x -= 1;
407-
^~~~~~
408-
test.rs:5:18: 5:19 note: borrow of `x` occurs here
409-
test.rs:5 let y = &x;
410-
^
404+
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
405+
test.rs:5 *x -= 1;
406+
^~
407+
test.rs:4:16: 4:18 note: borrow of `*x` occurs here
408+
test.rs:4 let y = &x;
409+
^~
411410
```
412411

413412
As you might guess, this kind of analysis is complex for a human, and therefore

branches/snap-stage3/src/doc/trpl/static-and-dynamic-dispatch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ dynamic dispatch is sometimes more efficient.
9393

9494
However, the common case is that it is more efficient to use static dispatch,
9595
and one can always have a thin statically-dispatched wrapper function that does
96-
a dynamic dispatch, but not vice versa, meaning static calls are more flexible.
97-
The standard library tries to be statically dispatched where possible for this
96+
a dynamic, but not vice versa, meaning static calls are more flexible. The
97+
standard library tries to be statically dispatched where possible for this
9898
reason.
9999

100100
## Dynamic dispatch

branches/snap-stage3/src/libcollections/borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<T> ToOwned for T where T: Clone {
132132
/// ```rust
133133
/// use std::borrow::Cow;
134134
///
135-
/// fn abs_all(input: &mut Cow<[i32]>) {
135+
/// fn abs_all(input: &mut Cow<[int]>) {
136136
/// for i in 0..input.len() {
137137
/// let v = input[i];
138138
/// if v < 0 {

branches/snap-stage3/src/libcollections/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@
404404
#![stable(feature = "rust1", since = "1.0.0")]
405405

406406
pub use core::fmt::{Formatter, Result, Write, rt};
407-
pub use core::fmt::{Octal, Binary};
407+
pub use core::fmt::{Show, String, Octal, Binary};
408408
pub use core::fmt::{Display, Debug};
409409
pub use core::fmt::{LowerHex, UpperHex, Pointer};
410410
pub use core::fmt::{LowerExp, UpperExp};

branches/snap-stage3/src/libcore/fmt/float.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ pub enum ExponentFormat {
4040
pub enum SignificantDigits {
4141
/// At most the given number of digits will be printed, truncating any
4242
/// trailing zeroes.
43-
DigMax(usize),
43+
DigMax(uint),
4444

4545
/// Precisely the given number of digits will be printed.
46-
DigExact(usize)
46+
DigExact(uint)
4747
}
4848

4949
/// How to emit the sign of a number.
@@ -240,27 +240,27 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
240240
// If reached left end of number, have to
241241
// insert additional digit:
242242
if i < 0
243-
|| buf[i as usize] == b'-'
244-
|| buf[i as usize] == b'+' {
245-
for j in (i as usize + 1..end).rev() {
243+
|| buf[i as uint] == b'-'
244+
|| buf[i as uint] == b'+' {
245+
for j in (i as uint + 1..end).rev() {
246246
buf[j + 1] = buf[j];
247247
}
248-
buf[(i + 1) as usize] = value2ascii(1);
248+
buf[(i + 1) as uint] = value2ascii(1);
249249
end += 1;
250250
break;
251251
}
252252

253253
// Skip the '.'
254-
if buf[i as usize] == b'.' { i -= 1; continue; }
254+
if buf[i as uint] == b'.' { i -= 1; continue; }
255255

256256
// Either increment the digit,
257257
// or set to 0 if max and carry the 1.
258-
let current_digit = ascii2value(buf[i as usize]);
258+
let current_digit = ascii2value(buf[i as uint]);
259259
if current_digit < (radix - 1) {
260-
buf[i as usize] = value2ascii(current_digit+1);
260+
buf[i as uint] = value2ascii(current_digit+1);
261261
break;
262262
} else {
263-
buf[i as usize] = value2ascii(0);
263+
buf[i as uint] = value2ascii(0);
264264
i -= 1;
265265
}
266266
}
@@ -311,7 +311,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
311311

312312
struct Filler<'a> {
313313
buf: &'a mut [u8],
314-
end: &'a mut usize,
314+
end: &'a mut uint,
315315
}
316316

317317
impl<'a> fmt::Write for Filler<'a> {

0 commit comments

Comments
 (0)