Skip to content

Commit 8a74489

Browse files
committed
---
yaml --- r: 34675 b: refs/heads/master c: 6854265 h: refs/heads/master i: 34673: 95ac612 34671: d1719f0 v: v3
1 parent 10b6227 commit 8a74489

File tree

7 files changed

+41
-30
lines changed

7 files changed

+41
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: bfbb7197d71a6ba48904e06e694bb53810825cf4
2+
refs/heads/master: 6854265161fa2ee23fca58cc1bcfad183c4b3730
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/src/libcore/flate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn deflate_bytes(bytes: &[const u8]) -> ~[u8] {
3737
ptr::addr_of(&outsz),
3838
lz_norm);
3939
assert res as int != 0;
40-
let out = vec::raw::from_buf(res as *u8,
40+
let out = vec::raw::from_buf_raw(res as *u8,
4141
outsz as uint);
4242
libc::free(res);
4343
move out
@@ -55,7 +55,7 @@ pub fn inflate_bytes(bytes: &[const u8]) -> ~[u8] {
5555
ptr::addr_of(&outsz),
5656
0);
5757
assert res as int != 0;
58-
let out = vec::raw::from_buf(res as *u8,
58+
let out = vec::raw::from_buf_raw(res as *u8,
5959
outsz as uint);
6060
libc::free(res);
6161
move out

trunk/src/libcore/task.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,8 @@ fn test_cant_dup_task_builder() {
759759
let b = task().unlinked();
760760
do b.spawn { }
761761
// FIXME(#3724): For now, this is a -runtime- failure, because we haven't
762-
// got move mode on self. When 3724 is fixed, this test should fail to compile
763-
// instead, and should go in tests/compile-fail.
762+
// got move mode on self. When 3724 is fixed, this test should fail to
763+
// compile instead, and should go in tests/compile-fail.
764764
do b.spawn { } // b should have been consumed by the previous call
765765
}
766766

trunk/src/libcore/vec.rs

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,9 +1657,22 @@ impl<T: Eq> ~[T]: MutableEqVector<T> {
16571657
}
16581658
}
16591659

1660+
1661+
/**
1662+
* Constructs a vector from an unsafe pointer to a buffer
1663+
*
1664+
* # Arguments
1665+
*
1666+
* * ptr - An unsafe pointer to a buffer of `T`
1667+
* * elts - The number of elements in the buffer
1668+
*/
1669+
// Wrapper for fn in raw: needs to be called by net_tcp::on_tcp_read_cb
1670+
pub unsafe fn from_buf<T>(ptr: *T, elts: uint) -> ~[T] {
1671+
raw::from_buf_raw(ptr, elts)
1672+
}
1673+
16601674
/// Unsafe operations
1661-
pub mod raw {
1662-
// FIXME: This should have crate visibility (#1893 blocks that)
1675+
mod raw {
16631676

16641677
/// The internal representation of a (boxed) vector
16651678
pub struct VecRepr {
@@ -1679,22 +1692,6 @@ pub mod raw {
16791692
mut len: uint
16801693
};
16811694

1682-
/**
1683-
* Constructs a vector from an unsafe pointer to a buffer
1684-
*
1685-
* # Arguments
1686-
*
1687-
* * ptr - An unsafe pointer to a buffer of `T`
1688-
* * elts - The number of elements in the buffer
1689-
*/
1690-
#[inline(always)]
1691-
pub unsafe fn from_buf<T>(ptr: *T, elts: uint) -> ~[T] {
1692-
let mut dst = with_capacity(elts);
1693-
set_len(&mut dst, elts);
1694-
as_mut_buf(dst, |p_dst, _len_dst| ptr::memcpy(p_dst, ptr, elts));
1695-
move dst
1696-
}
1697-
16981695
/**
16991696
* Sets the length of a vector
17001697
*
@@ -1775,6 +1772,23 @@ pub mod raw {
17751772
}
17761773
}
17771774

1775+
/**
1776+
* Constructs a vector from an unsafe pointer to a buffer
1777+
*
1778+
* # Arguments
1779+
*
1780+
* * ptr - An unsafe pointer to a buffer of `T`
1781+
* * elts - The number of elements in the buffer
1782+
*/
1783+
// Was in raw, but needs to be called by net_tcp::on_tcp_read_cb
1784+
#[inline(always)]
1785+
pub unsafe fn from_buf_raw<T>(ptr: *T, elts: uint) -> ~[T] {
1786+
let mut dst = with_capacity(elts);
1787+
set_len(&mut dst, elts);
1788+
as_mut_buf(dst, |p_dst, _len_dst| ptr::memcpy(p_dst, ptr, elts));
1789+
move dst
1790+
}
1791+
17781792
/**
17791793
* Copies data from one vector to another.
17801794
*

trunk/src/libstd/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ impl<T: Send> &MutexARC<T> {
190190
*
191191
* Will additionally fail if another task has failed while accessing the arc.
192192
*/
193-
// FIXME(#2585) make this a by-move method on the arc
193+
// FIXME(#3724) make this a by-move method on the arc
194194
pub fn unwrap_mutex_arc<T: Send>(arc: MutexARC<T>) -> T {
195195
let MutexARC { x: x } <- arc;
196196
let inner = unsafe { unwrap_shared_mutable_state(move x) };
@@ -368,7 +368,7 @@ impl<T: Const Send> &RWARC<T> {
368368
* Will additionally fail if another task has failed while accessing the arc
369369
* in write mode.
370370
*/
371-
// FIXME(#2585) make this a by-move method on the arc
371+
// FIXME(#3724) make this a by-move method on the arc
372372
pub fn unwrap_rw_arc<T: Const Send>(arc: RWARC<T>) -> T {
373373
let RWARC { x: x, _ } <- arc;
374374
let inner = unsafe { unwrap_shared_mutable_state(move x) };

trunk/src/libstd/net_tcp.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ use ip = net_ip;
66
use uv::iotask;
77
use uv::iotask::IoTask;
88
use future_spawn = future::spawn;
9-
// FIXME #1935
10-
// should be able to, but can't atm, replace w/ result::{result, extensions};
11-
use result::*;
9+
use result::{Result};
1210
use libc::size_t;
1311
use io::{Reader, ReaderUtil, Writer};
1412
use comm = core::comm;
@@ -1093,7 +1091,7 @@ extern fn on_tcp_read_cb(stream: *uv::ll::uv_stream_t,
10931091
log(debug, fmt!("tcp on_read_cb nread: %d", nread as int));
10941092
let reader_ch = (*socket_data_ptr).reader_ch;
10951093
let buf_base = uv::ll::get_base_from_buf(buf);
1096-
let new_bytes = vec::raw::from_buf(buf_base, nread as uint);
1094+
let new_bytes = vec::from_buf(buf_base, nread as uint);
10971095
core::comm::send(reader_ch, result::Ok(new_bytes));
10981096
}
10991097
}

trunk/src/libsyntax/ast_util.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ fn is_exported(i: ident, m: _mod) -> bool {
233233
}
234234
}
235235

236-
// FIXME: glob-exports aren't supported yet. (#2006)
237236
_ => ()
238237
}
239238
}

0 commit comments

Comments
 (0)