Skip to content

Commit 0dfbe68

Browse files
committed
---
yaml --- r: 48630 b: refs/heads/snap-stage3 c: c88ce30 h: refs/heads/master v: v3
1 parent 96a34dd commit 0dfbe68

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
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: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: e9a0db6abd40913f3b366a62ebf0f59adac57bb6
4+
refs/heads/snap-stage3: c88ce30c485b8df5f6dfa55d216c19c10cafe5dd
55
refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/cell.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use prelude::*;
1515
///
1616
/// Similar to a mutable option type, but friendlier.
1717
18-
#[deriving_eq]
1918
pub struct Cell<T> {
2019
mut value: Option<T>
2120
}

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,6 +2145,20 @@ pub mod raw {
21452145
f(*v)
21462146
}
21472147

2148+
/**
2149+
* Form a slice from a pointer and length (as a number of units,
2150+
* not bytes).
2151+
*/
2152+
#[inline(always)]
2153+
pub unsafe fn mut_buf_as_slice<T,U>(p: *mut T,
2154+
len: uint,
2155+
f: &fn(v: &mut [T]) -> U) -> U {
2156+
let pair = (p, len * sys::nonzero_size_of::<T>());
2157+
let v : *(&blk/mut [T]) =
2158+
::cast::reinterpret_cast(&addr_of(&pair));
2159+
f(*v)
2160+
}
2161+
21482162
/**
21492163
* Unchecked vector indexing.
21502164
*/

0 commit comments

Comments
 (0)