File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
branches/snap-stage3/src/libcore Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 3bbcac322669cff3abde5be937cc4ec3860f3985
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: e9a0db6abd40913f3b366a62ebf0f59adac57bb6
4
+ refs/heads/snap-stage3: c88ce30c485b8df5f6dfa55d216c19c10cafe5dd
5
5
refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ use prelude::*;
15
15
///
16
16
/// Similar to a mutable option type, but friendlier.
17
17
18
- #[ deriving_eq]
19
18
pub struct Cell < T > {
20
19
mut value : Option < T >
21
20
}
Original file line number Diff line number Diff line change @@ -2145,6 +2145,20 @@ pub mod raw {
2145
2145
f ( * v)
2146
2146
}
2147
2147
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
+
2148
2162
/**
2149
2163
* Unchecked vector indexing.
2150
2164
*/
You can’t perform that action at this time.
0 commit comments