Skip to content

Commit 7f43908

Browse files
committed
---
yaml --- r: 160066 b: refs/heads/try c: 7eae5b4 h: refs/heads/master v: v3
1 parent 1cba44e commit 7f43908

File tree

38 files changed

+300
-409
lines changed

38 files changed

+300
-409
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: e09d98603e608c9e47d4c89f7b4dca87a4b56da3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9c96a79a74f10bed18b031ce0ac4126c56d6cfb3
5-
refs/heads/try: f7be5966dc745509e6eaad3dc1de89448baad1f8
5+
refs/heads/try: 7eae5b458993b8a030ed9bb6e65c12babc4bbe4b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/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-
func foo(x) {
136+
fn foo(x) {
137137
x = 5
138138
}
139139
140-
func main() {
140+
fn 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-
func foo(&int x) {
156+
fn foo(&int x) {
157157
*x = 5
158158
}
159159
160-
func main() {
160+
fn 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-
func make_pointer(): &int {
195+
fn make_pointer(): &int {
196196
x = 5;
197197
198198
return &x;
199199
}
200200
201-
func main() {
201+
fn 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-
func mutate(&int i, int j) {
217+
fn mutate(&int i, int j) {
218218
*i = j;
219219
}
220220
221-
func main() {
221+
fn main() {
222222
x = 5;
223223
y = &x;
224224
z = &x; //y and z are aliased

branches/try/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-crates.md $lang:doc/l10n/$lang/guide-crates.md
22+
[type: text] src/doc/guide-unsafe.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/try/src/doc/reference.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,10 +2653,9 @@ 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-
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
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.
26602659

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

branches/try/src/etc/snapshot.py

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

7676

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

branches/try/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-
/// # Panics
261+
/// # Failure
262262
///
263-
/// Panics if `i` is out of bounds.
263+
/// Fails 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-
/// # Panics
288+
/// # Failure
289289
///
290-
/// Panics if `i` is out of bounds.
290+
/// Fails 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-
/// # Panics
356+
/// # Failure
357357
///
358-
/// Panics if the bitvectors are of different lengths.
358+
/// Fails 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-
/// # Panics
386+
/// # Failure
387387
///
388-
/// Panics if the bitvectors are of different lengths.
388+
/// Fails 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-
/// # Panics
416+
/// # Failure
417417
///
418-
/// Panics if the bitvectors are of different length.
418+
/// Fails 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-
/// # Panics
583+
/// # Failure
584584
///
585-
/// Panics if the the `Bitv` and slice are of different length.
585+
/// Fails 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-
/// # Panics
721+
/// # Failure
722722
///
723723
/// Assert if empty.
724724
///

branches/try/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-
/// # Panics
501+
/// # Failure
502502
///
503-
/// Panics if `new_len` > current length,
503+
/// Fails if `new_len` > current length,
504504
/// or if `new_len` is not a character boundary.
505505
///
506506
/// # Example

branches/try/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::TreeSet;
507+
/// use std::collections::BTreeSet;
508508
///
509-
/// let mut set = TreeSet::new();
509+
/// let mut set = BTreeSet::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::TreeSet;
525+
/// use std::collections::BTreeSet;
526526
///
527-
/// let mut set = TreeSet::new();
527+
/// let mut set = BTreeSet::new();
528528
///
529529
/// set.insert(2i);
530530
/// assert_eq!(set.remove(&2), true);

branches/try/src/libcollections/vec.rs

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

942942
/// Appends an element to the back of a collection.
943943
///
944-
/// # Panics
944+
/// # Failure
945945
///
946-
/// Panics if the number of elements in the vector overflows a `uint`.
946+
/// Fails if the number of elements in the vector overflows a `uint`.
947947
///
948948
/// # Example
949949
///
@@ -1462,9 +1462,9 @@ impl<T> Vec<T> {
14621462
/// Converts a `Vec<T>` to a `Vec<U>` where `T` and `U` have the same
14631463
/// size and in case they are not zero-sized the same minimal alignment.
14641464
///
1465-
/// # Panics
1465+
/// # Failure
14661466
///
1467-
/// Panics if `T` and `U` have differing sizes or are not zero-sized and
1467+
/// Fails if `T` and `U` have differing sizes or are not zero-sized and
14681468
/// have differing minimal alignments.
14691469
///
14701470
/// # Example

branches/try/src/libcore/atomic.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,19 @@ impl AtomicBool {
102102

103103
/// Load the value
104104
///
105-
/// # Panics
105+
/// # Failure
106106
///
107-
/// Panics if `order` is `Release` or `AcqRel`.
107+
/// Fails if `order` is `Release` or `AcqRel`.
108108
#[inline]
109109
pub fn load(&self, order: Ordering) -> bool {
110110
unsafe { atomic_load(self.v.get() as *const uint, order) > 0 }
111111
}
112112

113113
/// Store the value
114114
///
115-
/// # Panics
115+
/// # Failure
116116
///
117-
/// Panics if `order` is `Acquire` or `AcqRel`.
117+
/// Fails if `order` is `Acquire` or `AcqRel`.
118118
#[inline]
119119
pub fn store(&self, val: bool, order: Ordering) {
120120
let val = if val { UINT_TRUE } else { 0 };
@@ -313,19 +313,19 @@ impl AtomicInt {
313313

314314
/// Load the value
315315
///
316-
/// # Panics
316+
/// # Failure
317317
///
318-
/// Panics if `order` is `Release` or `AcqRel`.
318+
/// Fails if `order` is `Release` or `AcqRel`.
319319
#[inline]
320320
pub fn load(&self, order: Ordering) -> int {
321321
unsafe { atomic_load(self.v.get() as *const int, order) }
322322
}
323323

324324
/// Store the value
325325
///
326-
/// # Panics
326+
/// # Failure
327327
///
328-
/// Panics if `order` is `Acquire` or `AcqRel`.
328+
/// Fails if `order` is `Acquire` or `AcqRel`.
329329
#[inline]
330330
pub fn store(&self, val: int, order: Ordering) {
331331
unsafe { atomic_store(self.v.get(), val, order); }
@@ -435,19 +435,19 @@ impl AtomicUint {
435435

436436
/// Load the value
437437
///
438-
/// # Panics
438+
/// # Failure
439439
///
440-
/// Panics if `order` is `Release` or `AcqRel`.
440+
/// Fails if `order` is `Release` or `AcqRel`.
441441
#[inline]
442442
pub fn load(&self, order: Ordering) -> uint {
443443
unsafe { atomic_load(self.v.get() as *const uint, order) }
444444
}
445445

446446
/// Store the value
447447
///
448-
/// # Panics
448+
/// # Failure
449449
///
450-
/// Panics if `order` is `Acquire` or `AcqRel`.
450+
/// Fails if `order` is `Acquire` or `AcqRel`.
451451
#[inline]
452452
pub fn store(&self, val: uint, order: Ordering) {
453453
unsafe { atomic_store(self.v.get(), val, order); }
@@ -557,9 +557,9 @@ impl<T> AtomicPtr<T> {
557557

558558
/// Load the value
559559
///
560-
/// # Panics
560+
/// # Failure
561561
///
562-
/// Panics if `order` is `Release` or `AcqRel`.
562+
/// Fails if `order` is `Release` or `AcqRel`.
563563
#[inline]
564564
pub fn load(&self, order: Ordering) -> *mut T {
565565
unsafe {
@@ -569,9 +569,9 @@ impl<T> AtomicPtr<T> {
569569

570570
/// Store the value
571571
///
572-
/// # Panics
572+
/// # Failure
573573
///
574-
/// Panics if `order` is `Acquire` or `AcqRel`.
574+
/// Fails if `order` is `Acquire` or `AcqRel`.
575575
#[inline]
576576
pub fn store(&self, ptr: *mut T, order: Ordering) {
577577
unsafe { atomic_store(self.p.get(), ptr as uint, order); }
@@ -729,9 +729,9 @@ unsafe fn atomic_xor<T>(dst: *mut T, val: T, order: Ordering) -> T {
729729
///
730730
/// Accepts `Acquire`, `Release`, `AcqRel` and `SeqCst` orderings.
731731
///
732-
/// # Panics
732+
/// # Failure
733733
///
734-
/// Panics if `order` is `Relaxed`
734+
/// Fails if `order` is `Relaxed`
735735
#[inline]
736736
#[stable]
737737
pub fn fence(order: Ordering) {

0 commit comments

Comments
 (0)