Skip to content

Commit 4b5b34b

Browse files
committed
---
yaml --- r: 159164 b: refs/heads/snap-stage3 c: 4caffa8 h: refs/heads/master v: v3
1 parent a33ca99 commit 4b5b34b

File tree

43 files changed

+335
-464
lines changed

Some content is hidden

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

43 files changed

+335
-464
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: f3fd09a6f57bb9b634a38e672bcd51ef0922dbe1
4+
refs/heads/snap-stage3: 4caffa8526b2d359aff853964b08aebb9683bcdb
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-
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/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-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/snap-stage3/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/snap-stage3/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/snap-stage3/src/liballoc/rc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ pub struct Rc<T> {
179179
_noshare: marker::NoSync
180180
}
181181

182-
#[stable]
183182
impl<T> Rc<T> {
184183
/// Constructs a new reference-counted pointer.
184+
#[stable]
185185
pub fn new(value: T) -> Rc<T> {
186186
unsafe {
187187
Rc {
@@ -200,9 +200,7 @@ impl<T> Rc<T> {
200200
}
201201
}
202202
}
203-
}
204203

205-
impl<T> Rc<T> {
206204
/// Downgrades the reference-counted pointer to a weak reference.
207205
#[experimental = "Weak pointers may not belong in this module"]
208206
pub fn downgrade(&self) -> Weak<T> {

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-
/// # 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/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-
/// # 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/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::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/snap-stage3/src/libcollections/vec.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ impl<T> Vec<T> {
645645
/// assert!(vec.capacity() >= 3);
646646
/// ```
647647
#[stable]
648-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
649648
pub fn shrink_to_fit(&mut self) {
650649
if mem::size_of::<T>() == 0 { return }
651650

@@ -941,9 +940,9 @@ impl<T> Vec<T> {
941940

942941
/// Appends an element to the back of a collection.
943942
///
944-
/// # Panics
943+
/// # Failure
945944
///
946-
/// Panics if the number of elements in the vector overflows a `uint`.
945+
/// Fails if the number of elements in the vector overflows a `uint`.
947946
///
948947
/// # Example
949948
///
@@ -1462,9 +1461,9 @@ impl<T> Vec<T> {
14621461
/// Converts a `Vec<T>` to a `Vec<U>` where `T` and `U` have the same
14631462
/// size and in case they are not zero-sized the same minimal alignment.
14641463
///
1465-
/// # Panics
1464+
/// # Failure
14661465
///
1467-
/// Panics if `T` and `U` have differing sizes or are not zero-sized and
1466+
/// Fails if `T` and `U` have differing sizes or are not zero-sized and
14681467
/// have differing minimal alignments.
14691468
///
14701469
/// # Example

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ use intrinsics::TypeId;
8888
#[stable]
8989
pub trait Any: 'static {
9090
/// Get the `TypeId` of `self`
91+
#[stable]
9192
fn get_type_id(&self) -> TypeId;
9293
}
9394

@@ -117,7 +118,6 @@ pub trait AnyRefExt<'a> {
117118
#[stable]
118119
impl<'a> AnyRefExt<'a> for &'a Any {
119120
#[inline]
120-
#[stable]
121121
fn is<T: 'static>(self) -> bool {
122122
// Get TypeId of the type this function is instantiated with
123123
let t = TypeId::of::<T>();
@@ -130,7 +130,6 @@ impl<'a> AnyRefExt<'a> for &'a Any {
130130
}
131131

132132
#[inline]
133-
#[unstable = "naming conventions around acquiring references may change"]
134133
fn downcast_ref<T: 'static>(self) -> Option<&'a T> {
135134
if self.is::<T>() {
136135
unsafe {
@@ -159,7 +158,6 @@ pub trait AnyMutRefExt<'a> {
159158
#[stable]
160159
impl<'a> AnyMutRefExt<'a> for &'a mut Any {
161160
#[inline]
162-
#[unstable = "naming conventions around acquiring references may change"]
163161
fn downcast_mut<T: 'static>(self) -> Option<&'a mut T> {
164162
if self.is::<T>() {
165163
unsafe {

0 commit comments

Comments
 (0)