Skip to content

Commit daf3f46

Browse files
committed
---
yaml --- r: 156959 b: refs/heads/auto c: a33d761 h: refs/heads/master i: 156957: cea53a4 156955: 3e434fd 156951: e76cec2 156943: 0dc65d0 156927: f3309a8 v: v3
1 parent fe4abfa commit daf3f46

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 40811f84ef3f04230e29ec4feb4e99a5b79480cb
16+
refs/heads/auto: a33d7617c5b5d18ff495fe6aa9108aa13939a114
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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/auto/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/auto/src/test/run-pass/issue-17458.rs renamed to branches/auto/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/auto/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)