Skip to content

Commit f9d3a4c

Browse files
committed
---
yaml --- r: 275267 b: refs/heads/stable c: 77c1e11 h: refs/heads/master i: 275265: 0546109 275263: 6d672f6
1 parent 1d31e22 commit f9d3a4c

File tree

21 files changed

+40
-96
lines changed

21 files changed

+40
-96
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: 9c01031c728625c4eef078598d04b8376e4210e4
32+
refs/heads/stable: 77c1e11249703904adccdf7d5b52435a45e7f2db
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 improve performance of
79-
insertion and iteration, the latter by as much as 5x`][1.7bm].
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].
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/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/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)]

branches/stable/src/librustc/middle/dataflow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ impl<'a, 'tcx, O:DataFlowOperator> DataFlowContext<'a, 'tcx, O> {
489489
let bits = &mut self.scope_kills[start.. end];
490490
debug!("{} add_kills_from_flow_exits flow_exit={:?} bits={} [before]",
491491
self.analysis_name, flow_exit, mut_bits_to_string(bits));
492-
bits.copy_from_slice(&orig_kills[..]);
492+
bits.clone_from_slice(&orig_kills[..]);
493493
debug!("{} add_kills_from_flow_exits flow_exit={:?} bits={} [after]",
494494
self.analysis_name, flow_exit, mut_bits_to_string(bits));
495495
}
@@ -556,7 +556,7 @@ impl<'a, 'b, 'tcx, O:DataFlowOperator> PropagationContext<'a, 'b, 'tcx, O> {
556556
let (start, end) = self.dfcx.compute_id_range(node_index);
557557

558558
// Initialize local bitvector with state on-entry.
559-
in_out.copy_from_slice(&self.dfcx.on_entry[start.. end]);
559+
in_out.clone_from_slice(&self.dfcx.on_entry[start.. end]);
560560

561561
// Compute state on-exit by applying transfer function to
562562
// state on-entry.

branches/stable/src/librustc_back/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#![cfg_attr(not(stage0), deny(warnings))]
3232

3333
#![feature(box_syntax)]
34-
#![feature(copy_from_slice)]
3534
#![feature(libc)]
3635
#![feature(rand)]
3736
#![feature(rustc_private)]

branches/stable/src/librustc_back/sha2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ impl FixedBuffer for FixedBuffer64 {
134134
let buffer_remaining = size - self.buffer_idx;
135135
if input.len() >= buffer_remaining {
136136
self.buffer[self.buffer_idx..size]
137-
.copy_from_slice(&input[..buffer_remaining]);
137+
.clone_from_slice(&input[..buffer_remaining]);
138138
self.buffer_idx = 0;
139139
func(&self.buffer);
140140
i += buffer_remaining;
141141
} else {
142142
self.buffer[self.buffer_idx..self.buffer_idx + input.len()]
143-
.copy_from_slice(input);
143+
.clone_from_slice(input);
144144
self.buffer_idx += input.len();
145145
return;
146146
}
@@ -157,7 +157,7 @@ impl FixedBuffer for FixedBuffer64 {
157157
// data left in the input vector will be less than the buffer size and the buffer will
158158
// be empty.
159159
let input_remaining = input.len() - i;
160-
self.buffer[..input_remaining].copy_from_slice(&input[i..]);
160+
self.buffer[..input_remaining].clone_from_slice(&input[i..]);
161161
self.buffer_idx += input_remaining;
162162
}
163163

branches/stable/src/librustdoc/clean/inline.rs

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,6 @@ pub fn build_impls(cx: &DocContext, tcx: &ty::ctxt,
260260
match def {
261261
cstore::DlImpl(did) => build_impl(cx, tcx, did, impls),
262262
cstore::DlDef(Def::Mod(did)) => {
263-
// Don't recurse if this is a #[doc(hidden)] module
264-
if load_attrs(cx, tcx, did).iter().any(|a| is_doc_hidden(a)) {
265-
return;
266-
}
267-
268263
for item in tcx.sess.cstore.item_children(did) {
269264
populate_impls(cx, tcx, item.def, impls)
270265
}
@@ -428,19 +423,19 @@ pub fn build_impl(cx: &DocContext,
428423
deprecation: stability::lookup_deprecation(tcx, did).clean(cx),
429424
def_id: did,
430425
});
431-
}
432426

433-
fn is_doc_hidden(a: &clean::Attribute) -> bool {
434-
match *a {
435-
clean::List(ref name, ref inner) if *name == "doc" => {
436-
inner.iter().any(|a| {
437-
match *a {
438-
clean::Word(ref s) => *s == "hidden",
439-
_ => false,
440-
}
441-
})
427+
fn is_doc_hidden(a: &clean::Attribute) -> bool {
428+
match *a {
429+
clean::List(ref name, ref inner) if *name == "doc" => {
430+
inner.iter().any(|a| {
431+
match *a {
432+
clean::Word(ref s) => *s == "hidden",
433+
_ => false,
434+
}
435+
})
436+
}
437+
_ => false
442438
}
443-
_ => false
444439
}
445440
}
446441

branches/stable/src/libstd/io/cursor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ impl Write for Cursor<Vec<u8>> {
256256
let pos = pos as usize;
257257
let space = self.inner.len() - pos;
258258
let (left, right) = buf.split_at(cmp::min(space, buf.len()));
259-
self.inner[pos..pos + left.len()].copy_from_slice(left);
259+
self.inner[pos..pos + left.len()].clone_from_slice(left);
260260
self.inner.extend_from_slice(right);
261261
}
262262

branches/stable/src/libstd/io/impls.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl<'a> Read for &'a [u8] {
156156
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
157157
let amt = cmp::min(buf.len(), self.len());
158158
let (a, b) = self.split_at(amt);
159-
buf[..amt].copy_from_slice(a);
159+
buf[..amt].clone_from_slice(a);
160160
*self = b;
161161
Ok(amt)
162162
}
@@ -168,7 +168,7 @@ impl<'a> Read for &'a [u8] {
168168
"failed to fill whole buffer"));
169169
}
170170
let (a, b) = self.split_at(buf.len());
171-
buf.copy_from_slice(a);
171+
buf.clone_from_slice(a);
172172
*self = b;
173173
Ok(())
174174
}
@@ -189,7 +189,7 @@ impl<'a> Write for &'a mut [u8] {
189189
fn write(&mut self, data: &[u8]) -> io::Result<usize> {
190190
let amt = cmp::min(data.len(), self.len());
191191
let (a, b) = mem::replace(self, &mut []).split_at_mut(amt);
192-
a.copy_from_slice(&data[..amt]);
192+
a.clone_from_slice(&data[..amt]);
193193
*self = b;
194194
Ok(amt)
195195
}

branches/stable/src/libstd/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@
222222
#![feature(collections)]
223223
#![feature(collections_bound)]
224224
#![feature(const_fn)]
225-
#![feature(copy_from_slice)]
226225
#![feature(core_float)]
227226
#![feature(core_intrinsics)]
228227
#![feature(decode_utf16)]

branches/stable/src/libstd/net/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ impl<'a> Parser<'a> {
191191
fn ipv6_addr_from_head_tail(head: &[u16], tail: &[u16]) -> Ipv6Addr {
192192
assert!(head.len() + tail.len() <= 8);
193193
let mut gs = [0; 8];
194-
gs[..head.len()].copy_from_slice(head);
195-
gs[(8 - tail.len()) .. 8].copy_from_slice(tail);
194+
gs[..head.len()].clone_from_slice(head);
195+
gs[(8 - tail.len()) .. 8].clone_from_slice(tail);
196196
Ipv6Addr::new(gs[0], gs[1], gs[2], gs[3], gs[4], gs[5], gs[6], gs[7])
197197
}
198198

branches/stable/src/libstd/primitive_docs.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,6 @@ mod prim_tuple { }
488488
///
489489
/// *[See also the `std::f32` module](f32/index.html).*
490490
///
491-
/// However, please note that examples are shared between the `f64` and `f32`
492-
/// primitive types. So it's normal if you see usage of `f64` in there.
493-
///
494491
mod prim_f32 { }
495492

496493
#[doc(primitive = "f64")]
@@ -499,9 +496,6 @@ mod prim_f32 { }
499496
///
500497
/// *[See also the `std::f64` module](f64/index.html).*
501498
///
502-
/// However, please note that examples are shared between the `f64` and `f32`
503-
/// primitive types. So it's normal if you see usage of `f32` in there.
504-
///
505499
mod prim_f64 { }
506500

507501
#[doc(primitive = "i8")]

branches/stable/src/libstd/sys/common/wtf8.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl Wtf8Buf {
341341
Some((surrogate_pos, _)) => {
342342
pos = surrogate_pos + 3;
343343
self.bytes[surrogate_pos..pos]
344-
.copy_from_slice(UTF8_REPLACEMENT_CHARACTER);
344+
.clone_from_slice(UTF8_REPLACEMENT_CHARACTER);
345345
},
346346
None => return unsafe { String::from_utf8_unchecked(self.bytes) }
347347
}

branches/stable/src/libstd/sys/windows/rand.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,13 @@ impl Rng for OsRng {
4848
unsafe { mem::transmute(v) }
4949
}
5050
fn fill_bytes(&mut self, v: &mut [u8]) {
51-
// CryptGenRandom takes a DWORD (u32) for the length so we need to
52-
// split up the buffer.
53-
for slice in v.chunks_mut(<c::DWORD>::max_value() as usize) {
54-
let ret = unsafe {
55-
c::CryptGenRandom(self.hcryptprov, slice.len() as c::DWORD,
56-
slice.as_mut_ptr())
57-
};
58-
if ret == 0 {
59-
panic!("couldn't generate random bytes: {}",
60-
io::Error::last_os_error());
61-
}
51+
let ret = unsafe {
52+
c::CryptGenRandom(self.hcryptprov, v.len() as c::DWORD,
53+
v.as_mut_ptr())
54+
};
55+
if ret == 0 {
56+
panic!("couldn't generate random bytes: {}",
57+
io::Error::last_os_error());
6258
}
6359
}
6460
}

branches/stable/src/test/auxiliary/issue-29584.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

branches/stable/src/test/rustdoc/issue-29584.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)