Skip to content

Commit 302e231

Browse files
committed
---
yaml --- r: 275287 b: refs/heads/stable c: a34fd5c h: refs/heads/master i: 275285: b161a85 275283: e34e5dd 275279: 0b35839
1 parent 8d7d7b5 commit 302e231

File tree

34 files changed

+87
-276
lines changed

34 files changed

+87
-276
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 095f5e7c81ae2894bdad8b614297b281b67fd2fc
32+
refs/heads/stable: a34fd5c3fea8e7301e33531ee3c27b3299eaeab6
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ Libraries
7575
improved by using `memchr` to search for newlines][1.7m].
7676
* [`f32::to_degrees` and `f32::to_radians` are stable][1.7f]. The
7777
`f64` variants were stabilized previously.
78-
* [`BTreeMap` was rewritten to use less memory and improve the performance
79-
of insertion and iteration, the latter by as much as 5x`][1.7bm].
78+
* [`BTreeMap` was rewritten to use less memory improve performance of
79+
insertion and iteration, the latter by as much as 5x`][1.7bm].
8080
* [`BTreeSet` and its iterators, `Iter`, `IntoIter`, and `Range` are
8181
covariant over their contained type][1.7bt].
8282
* [`LinkedList` and its iterators, `Iter` and `IntoIter` are covariant

branches/stable/src/doc/book/const-and-static.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ unsafe {
6464

6565
[unsafe]: unsafe.html
6666

67-
Furthermore, any type stored in a `static` must be `Sync`, and must not have
67+
Furthermore, any type stored in a `static` must be `Sync`, and may not have
6868
a [`Drop`][drop] implementation.
6969

7070
[drop]: drop.html
7171

7272
# Initializing
7373

74-
Both `const` and `static` have requirements for giving them a value. They must
75-
be given a value that’s a constant expression. In other words, you cannot use
76-
the result of a function call or anything similarly complex or at runtime.
74+
Both `const` and `static` have requirements for giving them a value. They may
75+
only be given a value that’s a constant expression. In other words, you cannot
76+
use the result of a function call or anything similarly complex or at runtime.
7777

7878
# Which construct should I use?
7979

branches/stable/src/doc/book/guessing-game.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -906,17 +906,17 @@ let guess: u32 = match guess.trim().parse() {
906906
Err(_) => continue,
907907
};
908908
```
909+
909910
This is how you generally move from ‘crash on error’ to ‘actually handle the
910-
error’, by switching from `expect()` to a `match` statement. A `Result` is
911-
returned by `parse()`, this is an `enum` like `Ordering`, but in this case,
912-
each variant has some data associated with it: `Ok` is a success, and `Err` is a
911+
error’, by switching from `expect()` to a `match` statement. The `Result`
912+
returned by `parse()` is an `enum` like `Ordering`, but in this case, each
913+
variant has some data associated with it: `Ok` is a success, and `Err` is a
913914
failure. Each contains more information: the successfully parsed integer, or an
914-
error type. In this case, we `match` on `Ok(num)`, which sets the name `num` to
915-
the unwrapped `Ok` value (ythe integer), and then we return it on the
916-
right-hand side. In the `Err` case, we don’t care what kind of error it is, so
917-
we just use the catch all `_` instead of a name. This catches everything that
918-
isn't `Ok`, and `continue` lets us move to the next iteration of the loop; in
919-
effect, this enables us to ignore all errors and continue with our program.
915+
error type. In this case, we `match` on `Ok(num)`, which sets the inner value
916+
of the `Ok` to the name `num`, and then we return it on the right-hand
917+
side. In the `Err` case, we don’t care what kind of error it is, so we
918+
use `_` instead of a name. This ignores the error, and `continue` causes us
919+
to go to the next iteration of the `loop`.
920920
921921
Now we should be good! Let’s try:
922922

branches/stable/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3040,7 +3040,7 @@ the case of a `while` loop, the head is the conditional expression controlling
30403040
the loop. In the case of a `for` loop, the head is the call-expression
30413041
controlling the loop. If the label is present, then `continue 'foo` returns
30423042
control to the head of the loop with label `'foo`, which need not be the
3043-
innermost label enclosing the `continue` expression, but must enclose it.
3043+
innermost label enclosing the `break` expression, but must enclose it.
30443044

30453045
A `continue` expression is only permitted in the body of a loop.
30463046

branches/stable/src/libcollections/str.rs

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,9 @@ impl str {
267267
/// Converts a string slice to a raw pointer.
268268
///
269269
/// As string slices are a slice of bytes, the raw pointer points to a
270-
/// [`u8`]. This pointer will be pointing to the first byte of the string
270+
/// `u8`. This pointer will be pointing to the first byte of the string
271271
/// slice.
272272
///
273-
/// [`u8`]: primitive.u8.html
274-
///
275273
/// # Examples
276274
///
277275
/// Basic usage:
@@ -663,7 +661,7 @@ impl str {
663661
/// assert_eq!(None, chars.next());
664662
/// ```
665663
///
666-
/// Remember, [`char`]s may not match your human intuition about characters:
664+
/// Remember, `char`s may not match your human intuition about characters:
667665
///
668666
/// ```
669667
/// let y = "y̆";
@@ -680,18 +678,16 @@ impl str {
680678
pub fn chars(&self) -> Chars {
681679
core_str::StrExt::chars(self)
682680
}
683-
/// Returns an iterator over the [`char`]s of a string slice, and their
681+
/// Returns an iterator over the `char`s of a string slice, and their
684682
/// positions.
685683
///
686684
/// As a string slice consists of valid UTF-8, we can iterate through a
687-
/// string slice by [`char`]. This method returns an iterator of both
688-
/// these [`char`]s, as well as their byte positions.
685+
/// string slice by `char`. This method returns an iterator of both
686+
/// these `char`s, as well as their byte positions.
689687
///
690-
/// The iterator yields tuples. The position is first, the [`char`] is
688+
/// The iterator yields tuples. The position is first, the `char` is
691689
/// second.
692690
///
693-
/// [`char`]: primitive.char.html
694-
///
695691
/// # Examples
696692
///
697693
/// Basic usage:
@@ -715,7 +711,7 @@ impl str {
715711
/// assert_eq!(None, char_indices.next());
716712
/// ```
717713
///
718-
/// Remember, [`char`]s may not match your human intuition about characters:
714+
/// Remember, `char`s may not match your human intuition about characters:
719715
///
720716
/// ```
721717
/// let y = "y̆";
@@ -922,13 +918,12 @@ impl str {
922918
/// Returns the byte index of the first character of this string slice that
923919
/// matches the pattern.
924920
///
925-
/// Returns [`None`] if the pattern doesn't match.
921+
/// Returns `None` if the pattern doesn't match.
926922
///
927923
/// The pattern can be a `&str`, [`char`], or a closure that determines if
928924
/// a character matches.
929925
///
930926
/// [`char`]: primitive.char.html
931-
/// [`None`]: option/enum.Option.html#variant.None
932927
///
933928
/// # Examples
934929
///
@@ -967,13 +962,12 @@ impl str {
967962
/// Returns the byte index of the last character of this string slice that
968963
/// matches the pattern.
969964
///
970-
/// Returns [`None`] if the pattern doesn't match.
965+
/// Returns `None` if the pattern doesn't match.
971966
///
972967
/// The pattern can be a `&str`, [`char`], or a closure that determines if
973968
/// a character matches.
974969
///
975970
/// [`char`]: primitive.char.html
976-
/// [`None`]: option/enum.Option.html#variant.None
977971
///
978972
/// # Examples
979973
///
@@ -1193,18 +1187,14 @@ impl str {
11931187
/// An iterator over substrings of `self`, separated by characters
11941188
/// matched by a pattern and yielded in reverse order.
11951189
///
1196-
/// The pattern can be a simple `&str`, [`char`], or a closure that
1190+
/// The pattern can be a simple `&str`, `char`, or a closure that
11971191
/// determines the split.
11981192
/// Additional libraries might provide more complex patterns like
11991193
/// regular expressions.
12001194
///
1201-
/// [`char`]: primitive.char.html
1202-
///
1203-
/// Equivalent to [`split()`], except that the trailing substring is
1195+
/// Equivalent to `split`, except that the trailing substring is
12041196
/// skipped if empty.
12051197
///
1206-
/// [`split()`]: #method.split
1207-
///
12081198
/// This method can be used for string data that is _terminated_,
12091199
/// rather than _separated_ by a pattern.
12101200
///
@@ -1467,7 +1457,7 @@ impl str {
14671457
/// # Iterator behavior
14681458
///
14691459
/// The returned iterator requires that the pattern supports a reverse
1470-
/// search, and it will be a [`DoubleEndedIterator`] if a forward/reverse
1460+
/// search, and it will be a `[DoubleEndedIterator]` if a forward/reverse
14711461
/// search yields the same elements.
14721462
///
14731463
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
@@ -1704,11 +1694,9 @@ impl str {
17041694
///
17051695
/// # Errors
17061696
///
1707-
/// Will return [`Err`] if it's not possible to parse this string slice into
1697+
/// Will return `Err` if it's not possible to parse this string slice into
17081698
/// the desired type.
17091699
///
1710-
/// [`Err`]: str/trait.FromStr.html#associatedtype.Err
1711-
///
17121700
/// # Example
17131701
///
17141702
/// Basic usage
@@ -1719,7 +1707,7 @@ impl str {
17191707
/// assert_eq!(4, four);
17201708
/// ```
17211709
///
1722-
/// Using the 'turbofish' instead of annotating `four`:
1710+
/// Using the 'turbofish' instead of annotationg `four`:
17231711
///
17241712
/// ```
17251713
/// let four = "4".parse::<u32>();
@@ -1777,13 +1765,11 @@ impl str {
17771765
result
17781766
}
17791767

1780-
/// Returns the lowercase equivalent of this string slice, as a new [`String`].
1768+
/// Returns the lowercase equivalent of this string slice, as a new `String`.
17811769
///
17821770
/// 'Lowercase' is defined according to the terms of the Unicode Derived Core Property
17831771
/// `Lowercase`.
17841772
///
1785-
/// [`String`]: string/struct.String.html
1786-
///
17871773
/// # Examples
17881774
///
17891775
/// Basic usage:
@@ -1853,13 +1839,11 @@ impl str {
18531839
}
18541840
}
18551841

1856-
/// Returns the uppercase equivalent of this string slice, as a new [`String`].
1842+
/// Returns the uppercase equivalent of this string slice, as a new `String`.
18571843
///
18581844
/// 'Uppercase' is defined according to the terms of the Unicode Derived Core Property
18591845
/// `Uppercase`.
18601846
///
1861-
/// [`String`]: string/struct.String.html
1862-
///
18631847
/// # Examples
18641848
///
18651849
/// Basic usage:
@@ -1900,9 +1884,7 @@ impl str {
19001884
self.chars().flat_map(|c| c.escape_unicode()).collect()
19011885
}
19021886

1903-
/// Converts a `Box<str>` into a [`String`] without copying or allocating.
1904-
///
1905-
/// [`String`]: string/struct.String.html
1887+
/// Converts a `Box<str>` into a `String` without copying or allocating.
19061888
///
19071889
/// # Examples
19081890
///

branches/stable/src/libcore/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
//! ```
190190
//! let values = vec![1, 2, 3, 4, 5];
191191
//! {
192-
//! let result = match IntoIterator::into_iter(values) {
192+
//! let result = match values.into_iter() {
193193
//! mut iter => loop {
194194
//! match iter.next() {
195195
//! Some(x) => { println!("{}", x); },

branches/stable/src/libcore/num/flt2dec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl<'a> Part<'a> {
210210
}
211211
}
212212
Part::Copy(buf) => {
213-
out[..buf.len()].copy_from_slice(buf);
213+
out[..buf.len()].clone_from_slice(buf);
214214
}
215215
}
216216
Some(len)
@@ -245,7 +245,7 @@ impl<'a> Formatted<'a> {
245245
/// (It may still leave partially written bytes in the buffer; do not rely on that.)
246246
pub fn write(&self, out: &mut [u8]) -> Option<usize> {
247247
if out.len() < self.sign.len() { return None; }
248-
out[..self.sign.len()].copy_from_slice(self.sign);
248+
out[..self.sign.len()].clone_from_slice(self.sign);
249249

250250
let mut written = self.sign.len();
251251
for part in self.parts {

branches/stable/src/libcoretest/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#![feature(box_syntax)]
1616
#![feature(cell_extras)]
1717
#![feature(const_fn)]
18-
#![feature(copy_from_slice)]
1918
#![feature(core_float)]
2019
#![feature(core_private_bignum)]
2120
#![feature(core_private_diy_float)]

branches/stable/src/libcoretest/num/flt2dec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn check_exact<F, T>(mut f: F, v: T, vstr: &str, expected: &[u8], expectedk: i16
100100

101101
// check significant digits
102102
for i in 1..cut.unwrap_or(expected.len() - 1) {
103-
expected_[..i].copy_from_slice(&expected[..i]);
103+
expected_[..i].clone_from_slice(&expected[..i]);
104104
let mut expectedk_ = expectedk;
105105
if expected[i] >= b'5' {
106106
// check if this is a rounding-to-even case.
@@ -147,7 +147,7 @@ fn check_exact<F, T>(mut f: F, v: T, vstr: &str, expected: &[u8], expectedk: i16
147147
// check infinite zero digits
148148
if let Some(cut) = cut {
149149
for i in cut..expected.len()-1 {
150-
expected_[..cut].copy_from_slice(&expected[..cut]);
150+
expected_[..cut].clone_from_slice(&expected[..cut]);
151151
for c in &mut expected_[cut..i] { *c = b'0'; }
152152

153153
try_exact!(f(&decoded) => &mut buf, &expected_[..i], expectedk;

branches/stable/src/librbml/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
test(attr(deny(warnings))))]
123123
#![cfg_attr(not(stage0), deny(warnings))]
124124

125-
#![feature(copy_from_slice)]
126125
#![feature(rustc_private)]
127126
#![feature(staged_api)]
128127

@@ -520,7 +519,7 @@ pub mod reader {
520519
// of the page and segfault.
521520

522521
let mut b = [0; 8];
523-
b.copy_from_slice(&d.data[d.end - 8..d.end]);
522+
b.clone_from_slice(&d.data[d.end - 8..d.end]);
524523
let data = unsafe { (*(b.as_ptr() as *const u64)).to_be() };
525524
let len = d.end - d.start;
526525
if len < 8 {
@@ -1044,7 +1043,7 @@ pub mod writer {
10441043
{
10451044
let last_size_pos = last_size_pos as usize;
10461045
let data = &self.writer.get_ref()[last_size_pos + 4..cur_pos as usize];
1047-
buf[..size].copy_from_slice(data);
1046+
buf[..size].clone_from_slice(data);
10481047
}
10491048

10501049
// overwrite the size and data and continue

branches/stable/src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#![feature(cell_extras)]
3030
#![feature(collections)]
3131
#![feature(const_fn)]
32-
#![feature(copy_from_slice)]
3332
#![feature(enumset)]
3433
#![feature(iter_arith)]
3534
#![feature(libc)]

0 commit comments

Comments
 (0)