Skip to content

Commit 6f922e2

Browse files
committed
---
yaml --- r: 157557 b: refs/heads/snap-stage3 c: a33d761 h: refs/heads/master i: 157555: 2b3aa92 v: v3
1 parent f51e0b7 commit 6f922e2

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
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: 065caf34f5ff29e04605f95d9c5d511af219439a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 40811f84ef3f04230e29ec4feb4e99a5b79480cb
4+
refs/heads/snap-stage3: a33d7617c5b5d18ff495fe6aa9108aa13939a114
55
refs/heads/try: 0ee4d8b0b112c608646fa75463ab4dc59132efd9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl<T> Vec<T> {
231231
/// }
232232
///
233233
/// // Put everything back together into a Vec
234-
/// let rebuilt = Vec::from_raw_parts(len, cap, p);
234+
/// let rebuilt = Vec::from_raw_parts(p, len, cap);
235235
/// assert_eq!(rebuilt, vec![4i, 5i, 6i]);
236236
/// }
237237
/// }

branches/snap-stage3/src/libstd/ascii.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ impl OwnedAsciiCast for Vec<u8> {
259259

260260
#[inline]
261261
unsafe fn into_ascii_nocheck(self) -> Vec<Ascii> {
262-
let v = Vec::from_raw_parts(self.len(),
263-
self.capacity(),
264-
mem::transmute(self.as_ptr()));
262+
let v = Vec::from_raw_parts(self.as_ptr() as *mut Ascii,
263+
self.len(),
264+
self.capacity());
265265

266266
// We forget `self` to avoid freeing it at the end of the scope
267267
// Otherwise, the returned `Vec` would point to freed memory
@@ -345,9 +345,9 @@ pub trait IntoBytes {
345345
impl IntoBytes for Vec<Ascii> {
346346
fn into_bytes(self) -> Vec<u8> {
347347
unsafe {
348-
let v = Vec::from_raw_parts(self.len(),
349-
self.capacity(),
350-
mem::transmute(self.as_ptr()));
348+
let v = Vec::from_raw_parts(self.as_ptr() as *mut u8,
349+
self.len(),
350+
self.capacity());
351351

352352
// We forget `self` to avoid freeing it at the end of the scope
353353
// Otherwise, the returned `Vec` would point to freed memory

branches/snap-stage3/src/test/run-pass/issue-17458.rs renamed to branches/snap-stage3/src/test/compile-fail/issue-17458.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
static X: uint = 0 as *const uint as uint;
12+
//~^ ERROR: can not cast a pointer to an integer in a constant expression
1213

1314
fn main() {
1415
assert_eq!(X, 0);

branches/snap-stage3/src/test/run-pass/issue-16668.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-pretty
12+
1113
#![feature(unboxed_closures)]
1214

1315
struct Parser<'a, I, O> {

0 commit comments

Comments
 (0)