Skip to content

Commit 5168e17

Browse files
author
Jakub Bukaj
committed
---
yaml --- r: 159166 b: refs/heads/snap-stage3 c: 42c77f4 h: refs/heads/master v: v3
1 parent 04927a2 commit 5168e17

File tree

40 files changed

+449
-273
lines changed

40 files changed

+449
-273
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: 40fb87d40f681f5356af42175fc7b85da387f037
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 60741e0fa0948c75040d0d554b46027021185600
4+
refs/heads/snap-stage3: 42c77f4958fcd6c2238d883c49f52341e0631999
55
refs/heads/try: f58aad6dce273570fb130b4df008ef9acd5a5be2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ pass-by-reference. Basically, languages can make two choices (this is made
133133
up syntax, it's not Rust):
134134

135135
```{notrust,ignore}
136-
fn foo(x) {
136+
func foo(x) {
137137
x = 5
138138
}
139139
140-
fn main() {
140+
func main() {
141141
i = 1
142142
foo(i)
143143
// what is the value of i here?
@@ -153,11 +153,11 @@ So what do pointers have to do with this? Well, since pointers point to a
153153
location in memory...
154154

155155
```{notrust,ignore}
156-
fn foo(&int x) {
156+
func foo(&int x) {
157157
*x = 5
158158
}
159159
160-
fn main() {
160+
func main() {
161161
i = 1
162162
foo(&i)
163163
// what is the value of i here?
@@ -192,13 +192,13 @@ When you combine pointers and functions, it's easy to accidentally invalidate
192192
the memory the pointer is pointing to. For example:
193193

194194
```{notrust,ignore}
195-
fn make_pointer(): &int {
195+
func make_pointer(): &int {
196196
x = 5;
197197
198198
return &x;
199199
}
200200
201-
fn main() {
201+
func main() {
202202
&int i = make_pointer();
203203
*i = 5; // uh oh!
204204
}
@@ -214,11 +214,11 @@ issue. Two pointers are said to alias when they point at the same location
214214
in memory. Like this:
215215

216216
```{notrust,ignore}
217-
fn mutate(&int i, int j) {
217+
func mutate(&int i, int j) {
218218
*i = j;
219219
}
220220
221-
fn main() {
221+
func main() {
222222
x = 5;
223223
y = &x;
224224
z = &x; //y and z are aliased

branches/snap-stage3/src/doc/po4a.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[type: text] src/doc/guide-tasks.md $lang:doc/l10n/$lang/guide-tasks.md
2020
[type: text] src/doc/guide-testing.md $lang:doc/l10n/$lang/guide-testing.md
2121
[type: text] src/doc/guide-unsafe.md $lang:doc/l10n/$lang/guide-unsafe.md
22-
[type: text] src/doc/guide-unsafe.md $lang:doc/l10n/$lang/guide-crates.md
22+
[type: text] src/doc/guide-crates.md $lang:doc/l10n/$lang/guide-crates.md
2323
[type: text] src/doc/guide.md $lang:doc/l10n/$lang/guide.md
2424
[type: text] src/doc/index.md $lang:doc/l10n/$lang/index.md
2525
[type: text] src/doc/intro.md $lang:doc/l10n/$lang/intro.md

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,9 +2653,10 @@ An expression may have two roles: it always produces a *value*, and it may have
26532653
value, and has effects during *evaluation*. Many expressions contain
26542654
sub-expressions (operands). The meaning of each kind of expression dictates
26552655
several things:
2656-
* Whether or not to evaluate the sub-expressions when evaluating the
2657-
* expression The order in which to evaluate the sub-expressions How to
2658-
* combine the sub-expressions' values to obtain the value of the expression.
2656+
2657+
* Whether or not to evaluate the sub-expressions when evaluating the expression
2658+
* The order in which to evaluate the sub-expressions
2659+
* How to combine the sub-expressions' values to obtain the value of the expression
26592660

26602661
In this way, the structure of expressions dictates the structure of execution.
26612662
Blocks are just another kind of expression, so blocks, statements, expressions,

branches/snap-stage3/src/etc/snapshot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ def full_snapshot_name(date, rev, platform, hsh):
7575

7676

7777
def get_kernel(triple):
78-
os_name = triple.split('-')[2]
78+
t = triple.split('-')
79+
if len(t) == 2:
80+
os_name = t[1]
81+
else:
82+
os_name = t[2]
7983
if os_name == "windows":
8084
return "winnt"
8185
if os_name == "darwin":

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ impl Bitv {
258258

259259
/// Retrieves the value at index `i`.
260260
///
261-
/// # Failure
261+
/// # Panics
262262
///
263-
/// Fails if `i` is out of bounds.
263+
/// Panics if `i` is out of bounds.
264264
///
265265
/// # Example
266266
///
@@ -285,9 +285,9 @@ impl Bitv {
285285

286286
/// Sets the value of a bit at a index `i`.
287287
///
288-
/// # Failure
288+
/// # Panics
289289
///
290-
/// Fails if `i` is out of bounds.
290+
/// Panics if `i` is out of bounds.
291291
///
292292
/// # Example
293293
///
@@ -353,9 +353,9 @@ impl Bitv {
353353
/// Sets `self` to the union of `self` and `other`. Both bitvectors must be
354354
/// the same length. Returns `true` if `self` changed.
355355
///
356-
/// # Failure
356+
/// # Panics
357357
///
358-
/// Fails if the bitvectors are of different lengths.
358+
/// Panics if the bitvectors are of different lengths.
359359
///
360360
/// # Example
361361
///
@@ -383,9 +383,9 @@ impl Bitv {
383383
/// Sets `self` to the intersection of `self` and `other`. Both bitvectors
384384
/// must be the same length. Returns `true` if `self` changed.
385385
///
386-
/// # Failure
386+
/// # Panics
387387
///
388-
/// Fails if the bitvectors are of different lengths.
388+
/// Panics if the bitvectors are of different lengths.
389389
///
390390
/// # Example
391391
///
@@ -413,9 +413,9 @@ impl Bitv {
413413
/// element of `other` at the same index. Both bitvectors must be the same
414414
/// length. Returns `true` if `self` changed.
415415
///
416-
/// # Failure
416+
/// # Panics
417417
///
418-
/// Fails if the bitvectors are of different length.
418+
/// Panics if the bitvectors are of different length.
419419
///
420420
/// # Example
421421
///
@@ -580,9 +580,9 @@ impl Bitv {
580580
/// Compares a `Bitv` to a slice of `bool`s.
581581
/// Both the `Bitv` and slice must have the same length.
582582
///
583-
/// # Failure
583+
/// # Panics
584584
///
585-
/// Fails if the the `Bitv` and slice are of different length.
585+
/// Panics if the the `Bitv` and slice are of different length.
586586
///
587587
/// # Example
588588
///
@@ -718,7 +718,7 @@ impl Bitv {
718718

719719
/// Shortens by one element and returns the removed element.
720720
///
721-
/// # Failure
721+
/// # Panics
722722
///
723723
/// Assert if empty.
724724
///

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,9 @@ impl String {
498498

499499
/// Shortens a string to the specified length.
500500
///
501-
/// # Failure
501+
/// # Panics
502502
///
503-
/// Fails if `new_len` > current length,
503+
/// Panics if `new_len` > current length,
504504
/// or if `new_len` is not a character boundary.
505505
///
506506
/// # Example

branches/snap-stage3/src/libcollections/tree/set.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,9 @@ impl<T: Ord> TreeSet<T> {
504504
/// # Example
505505
///
506506
/// ```
507-
/// use std::collections::BTreeSet;
507+
/// use std::collections::TreeSet;
508508
///
509-
/// let mut set = BTreeSet::new();
509+
/// let mut set = TreeSet::new();
510510
///
511511
/// assert_eq!(set.insert(2i), true);
512512
/// assert_eq!(set.insert(2i), false);
@@ -522,9 +522,9 @@ impl<T: Ord> TreeSet<T> {
522522
/// # Example
523523
///
524524
/// ```
525-
/// use std::collections::BTreeSet;
525+
/// use std::collections::TreeSet;
526526
///
527-
/// let mut set = BTreeSet::new();
527+
/// let mut set = TreeSet::new();
528528
///
529529
/// set.insert(2i);
530530
/// assert_eq!(set.remove(&2), true);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,9 +940,9 @@ impl<T> Vec<T> {
940940

941941
/// Appends an element to the back of a collection.
942942
///
943-
/// # Failure
943+
/// # Panics
944944
///
945-
/// Fails if the number of elements in the vector overflows a `uint`.
945+
/// Panics if the number of elements in the vector overflows a `uint`.
946946
///
947947
/// # Example
948948
///
@@ -1461,9 +1461,9 @@ impl<T> Vec<T> {
14611461
/// Converts a `Vec<T>` to a `Vec<U>` where `T` and `U` have the same
14621462
/// size and in case they are not zero-sized the same minimal alignment.
14631463
///
1464-
/// # Failure
1464+
/// # Panics
14651465
///
1466-
/// Fails if `T` and `U` have differing sizes or are not zero-sized and
1466+
/// Panics if `T` and `U` have differing sizes or are not zero-sized and
14671467
/// have differing minimal alignments.
14681468
///
14691469
/// # Example

branches/snap-stage3/src/libcore/atomic.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ impl AtomicBool {
107107

108108
/// Load the value
109109
///
110-
/// # Failure
110+
/// # Panics
111111
///
112-
/// Fails if `order` is `Release` or `AcqRel`.
112+
/// Panics if `order` is `Release` or `AcqRel`.
113113
#[inline]
114114
#[stable]
115115
pub fn load(&self, order: Ordering) -> bool {
@@ -118,9 +118,9 @@ impl AtomicBool {
118118

119119
/// Store the value
120120
///
121-
/// # Failure
121+
/// # Panics
122122
///
123-
/// Fails if `order` is `Acquire` or `AcqRel`.
123+
/// Panics if `order` is `Acquire` or `AcqRel`.
124124
#[inline]
125125
#[stable]
126126
pub fn store(&self, val: bool, order: Ordering) {
@@ -326,9 +326,9 @@ impl AtomicInt {
326326

327327
/// Load the value
328328
///
329-
/// # Failure
329+
/// # Panics
330330
///
331-
/// Fails if `order` is `Release` or `AcqRel`.
331+
/// Panics if `order` is `Release` or `AcqRel`.
332332
#[inline]
333333
#[stable]
334334
pub fn load(&self, order: Ordering) -> int {
@@ -337,9 +337,9 @@ impl AtomicInt {
337337

338338
/// Store the value
339339
///
340-
/// # Failure
340+
/// # Panics
341341
///
342-
/// Fails if `order` is `Acquire` or `AcqRel`.
342+
/// Panics if `order` is `Acquire` or `AcqRel`.
343343
#[inline]
344344
#[stable]
345345
pub fn store(&self, val: int, order: Ordering) {
@@ -457,9 +457,9 @@ impl AtomicUint {
457457

458458
/// Load the value
459459
///
460-
/// # Failure
460+
/// # Panics
461461
///
462-
/// Fails if `order` is `Release` or `AcqRel`.
462+
/// Panics if `order` is `Release` or `AcqRel`.
463463
#[inline]
464464
#[stable]
465465
pub fn load(&self, order: Ordering) -> uint {
@@ -468,9 +468,9 @@ impl AtomicUint {
468468

469469
/// Store the value
470470
///
471-
/// # Failure
471+
/// # Panics
472472
///
473-
/// Fails if `order` is `Acquire` or `AcqRel`.
473+
/// Panics if `order` is `Acquire` or `AcqRel`.
474474
#[inline]
475475
#[stable]
476476
pub fn store(&self, val: uint, order: Ordering) {
@@ -588,9 +588,9 @@ impl<T> AtomicPtr<T> {
588588

589589
/// Load the value
590590
///
591-
/// # Failure
591+
/// # Panics
592592
///
593-
/// Fails if `order` is `Release` or `AcqRel`.
593+
/// Panics if `order` is `Release` or `AcqRel`.
594594
#[inline]
595595
#[stable]
596596
pub fn load(&self, order: Ordering) -> *mut T {
@@ -601,9 +601,9 @@ impl<T> AtomicPtr<T> {
601601

602602
/// Store the value
603603
///
604-
/// # Failure
604+
/// # Panics
605605
///
606-
/// Fails if `order` is `Acquire` or `AcqRel`.
606+
/// Panics if `order` is `Acquire` or `AcqRel`.
607607
#[inline]
608608
#[stable]
609609
pub fn store(&self, ptr: *mut T, order: Ordering) {
@@ -773,9 +773,9 @@ unsafe fn atomic_xor<T>(dst: *mut T, val: T, order: Ordering) -> T {
773773
///
774774
/// Accepts `Acquire`, `Release`, `AcqRel` and `SeqCst` orderings.
775775
///
776-
/// # Failure
776+
/// # Panics
777777
///
778-
/// Fails if `order` is `Relaxed`
778+
/// Panics if `order` is `Relaxed`
779779
#[inline]
780780
#[stable]
781781
pub fn fence(order: Ordering) {

0 commit comments

Comments
 (0)