Permalink
Browse files

Convert all kind bounds to camel case. Remove send, owned keywords.

  • Loading branch information...
1 parent 07fe561 commit 3bd1f32cd945fab63777b71ef76f23d758e2904c @brson brson committed Sep 7, 2012
Showing with 613 additions and 622 deletions.
  1. +5 −5 doc/rust.md
  2. +5 −5 doc/tutorial.md
  3. +1 −1 src/fuzzer/fuzzer.rs
  4. +3 −3 src/libcore/at_vec.rs
  5. +17 −17 src/libcore/comm.rs
  6. +2 −2 src/libcore/dlist.rs
  7. +2 −2 src/libcore/dvec.rs
  8. +5 −5 src/libcore/either.rs
  9. +5 −5 src/libcore/future.rs
  10. +2 −2 src/libcore/iter-trait.rs
  11. +12 −12 src/libcore/iter.rs
  12. +4 −4 src/libcore/option.rs
  13. +65 −65 src/libcore/pipes.rs
  14. +1 −1 src/libcore/priv.rs
  15. +6 −6 src/libcore/rand.rs
  16. +18 −18 src/libcore/result.rs
  17. +5 −5 src/libcore/send_map.rs
  18. +21 −21 src/libcore/task.rs
  19. +2 −2 src/libcore/to_str.rs
  20. +3 −3 src/libcore/tuple.rs
  21. +11 −11 src/libcore/unsafe.rs
  22. +1 −1 src/libcore/util.rs
  23. +45 −45 src/libcore/vec.rs
  24. +22 −22 src/libstd/arc.rs
  25. +2 −2 src/libstd/c_vec.rs
  26. +2 −2 src/libstd/comm.rs
  27. +5 −5 src/libstd/deque.rs
  28. +3 −3 src/libstd/fun_treemap.rs
  29. +1 −1 src/libstd/json.rs
  30. +10 −10 src/libstd/list.rs
  31. +21 −21 src/libstd/map.rs
  32. +6 −6 src/libstd/par.rs
  33. +4 −4 src/libstd/serialization.rs
  34. +10 −10 src/libstd/smallintmap.rs
  35. +9 −9 src/libstd/sort.rs
  36. +3 −3 src/libstd/sync.rs
  37. +2 −2 src/libstd/timer.rs
  38. +3 −3 src/libstd/treemap.rs
  39. +1 −1 src/libsyntax/ast_util.rs
  40. +1 −1 src/libsyntax/diagnostic.rs
  41. +1 −1 src/libsyntax/ext/simplext.rs
  42. +14 −14 src/libsyntax/parse/common.rs
  43. +1 −9 src/libsyntax/parse/parser.rs
  44. +1 −2 src/libsyntax/parse/token.rs
  45. +4 −4 src/libsyntax/print/pprust.rs
  46. +5 −5 src/libsyntax/util/interner.rs
  47. +1 −1 src/rustc/driver/session.rs
  48. +1 −1 src/rustc/front/core_inject.rs
  49. +1 −1 src/rustc/front/test.rs
  50. +1 −1 src/rustc/metadata/encoder.rs
  51. +1 −1 src/rustc/metadata/filesearch.rs
  52. +1 −1 src/rustc/middle/borrowck.rs
  53. +1 −1 src/rustc/middle/resolve.rs
  54. +2 −2 src/rustc/middle/trans/debuginfo.rs
  55. +1 −1 src/rustc/middle/trans/shape.rs
  56. +3 −3 src/rustc/middle/ty.rs
  57. +9 −9 src/rustc/middle/typeck/astconv.rs
  58. +1 −1 src/rustc/middle/typeck/check.rs
  59. +1 −1 src/rustc/middle/typeck/collect.rs
  60. +7 −7 src/rustc/middle/typeck/infer.rs
  61. +3 −3 src/rustc/middle/typeck/infer/to_str.rs
  62. +5 −5 src/rustc/middle/typeck/infer/unify.rs
  63. +2 −2 src/rustc/middle/typeck/rscope.rs
  64. +1 −1 src/rustdoc/astsrv.rs
  65. +1 −1 src/rustdoc/attr_pass.rs
  66. +8 −8 src/rustdoc/fold.rs
  67. +1 −1 src/test/auxiliary/cci_capture_clause.rs
  68. +4 −4 src/test/auxiliary/cci_nested_lib.rs
  69. +3 −3 src/test/auxiliary/issue-2526.rs
  70. +1 −1 src/test/auxiliary/issue-2631-a.rs
  71. +1 −1 src/test/auxiliary/static-methods-crate.rs
  72. +6 −6 src/test/auxiliary/test_comm.rs
  73. +1 −1 src/test/bench/pingpong.rs
  74. +3 −3 src/test/bench/shootout-k-nucleotide-pipes.rs
  75. +3 −3 src/test/bench/shootout-k-nucleotide.rs
  76. +18 −18 src/test/bench/task-perf-word-count-generic.rs
  77. +2 −2 src/test/compile-fail/bad-method-typaram-kind.rs
  78. +1 −1 src/test/compile-fail/fn-variance-2.rs
  79. +1 −1 src/test/compile-fail/fn-variance-3.rs
  80. +1 −1 src/test/compile-fail/infinite-instantiation.rs
  81. +1 −1 src/test/compile-fail/issue-2587-2.rs
  82. +2 −2 src/test/compile-fail/issue-2611-3.rs
  83. +2 −2 src/test/compile-fail/issue-2611-4.rs
  84. +2 −2 src/test/compile-fail/issue-2611-5.rs
  85. +1 −1 src/test/compile-fail/issue-2718-a.rs
  86. +3 −3 src/test/compile-fail/issue-2766-a.rs
  87. +2 −2 src/test/compile-fail/kindck-owned-trait-contains.rs
  88. +4 −4 src/test/compile-fail/kindck-owned-trait-scoped.rs
  89. +2 −2 src/test/compile-fail/kindck-owned-trait.rs
  90. +2 −2 src/test/compile-fail/kindck-owned.rs
  91. +1 −1 src/test/compile-fail/liveness-use-after-send.rs
  92. +1 −1 src/test/compile-fail/non-const.rs
  93. +1 −1 src/test/compile-fail/tag-that-dare-not-speak-its-name.rs
  94. +1 −1 src/test/compile-fail/tps-invariant-trait.rs
  95. +1 −1 src/test/compile-fail/unique-unique-kind.rs
  96. +1 −1 src/test/compile-fail/vec-concat-bug.rs
  97. +2 −2 src/test/run-fail/bug-811.rs
  98. +1 −1 src/test/run-fail/issue-2444.rs
  99. +1 −1 src/test/run-fail/port-type.rs
  100. +1 −1 src/test/run-pass/alignment-gep-tup-like-1.rs
  101. +2 −2 src/test/run-pass/alignment-gep-tup-like-2.rs
  102. +1 −1 src/test/run-pass/auto-instantiate.rs
  103. +1 −1 src/test/run-pass/autobind.rs
  104. +1 −1 src/test/run-pass/bounded-fn-type.rs
  105. +2 −2 src/test/run-pass/box-unbox.rs
  106. +2 −2 src/test/run-pass/class-impl-very-parameterized-trait.rs
  107. +1 −1 src/test/run-pass/class-trait-bounded-param.rs
  108. +1 −1 src/test/run-pass/close-over-big-then-small-data.rs
  109. +1 −1 src/test/run-pass/const-bound.rs
  110. +1 −1 src/test/run-pass/expr-alt-generic-box2.rs
  111. +1 −1 src/test/run-pass/expr-alt-generic-unique1.rs
  112. +1 −1 src/test/run-pass/expr-alt-generic-unique2.rs
  113. +1 −1 src/test/run-pass/expr-alt-generic.rs
  114. +1 −1 src/test/run-pass/expr-block-generic-box2.rs
  115. +1 −1 src/test/run-pass/expr-block-generic-unique1.rs
  116. +1 −1 src/test/run-pass/expr-block-generic-unique2.rs
  117. +1 −1 src/test/run-pass/expr-block-generic.rs
  118. +1 −1 src/test/run-pass/expr-fn.rs
  119. +1 −1 src/test/run-pass/expr-if-generic-box2.rs
  120. +1 −1 src/test/run-pass/expr-if-generic.rs
  121. +2 −2 src/test/run-pass/fixed-point-bind-unique.rs
  122. +1 −1 src/test/run-pass/fn-bare-spawn.rs
  123. +1 −1 src/test/run-pass/generic-alias-box.rs
  124. +1 −1 src/test/run-pass/generic-alias-unique.rs
  125. +1 −1 src/test/run-pass/generic-box.rs
  126. +2 −2 src/test/run-pass/generic-derived-type.rs
  127. +1 −1 src/test/run-pass/generic-drop-glue.rs
  128. +2 −2 src/test/run-pass/generic-exterior-box.rs
  129. +2 −2 src/test/run-pass/generic-exterior-unique.rs
  130. +1 −1 src/test/run-pass/generic-fn-infer.rs
  131. +1 −1 src/test/run-pass/generic-fn-unique.rs
  132. +1 −1 src/test/run-pass/generic-fn.rs
  133. +1 −1 src/test/run-pass/generic-tup.rs
  134. +1 −1 src/test/run-pass/generic-unique.rs
  135. +4 −4 src/test/run-pass/issue-2288.rs
  136. +3 −3 src/test/run-pass/issue-2311-2.rs
  137. +3 −3 src/test/run-pass/issue-2445-b.rs
  138. +3 −3 src/test/run-pass/issue-2445.rs
  139. +1 −1 src/test/run-pass/issue-2550.rs
  140. +3 −3 src/test/run-pass/issue-2611.rs
  141. +11 −11 src/test/run-pass/issue-2718.rs
  142. +1 −1 src/test/run-pass/issue-2734.rs
  143. +1 −1 src/test/run-pass/issue-2735.rs
  144. +1 −1 src/test/run-pass/issue-2904.rs
  145. +1 −1 src/test/run-pass/issue-2930.rs
  146. +2 −2 src/test/run-pass/issue-3149.rs
  147. +2 −2 src/test/run-pass/issue-333.rs
  148. +1 −1 src/test/run-pass/ivec-add.rs
  149. +2 −2 src/test/run-pass/kindck-owned-trait-contains-1.rs
  150. +2 −2 src/test/run-pass/monad.rs
  151. +2 −2 src/test/run-pass/newtype-polymorphic.rs
  152. +4 −4 src/test/run-pass/non-boolean-pure-fns.rs
  153. +1 −1 src/test/run-pass/pipe-bank-proto.rs
  154. +1 −1 src/test/run-pass/pipe-select.rs
  155. +2 −2 src/test/run-pass/resource-generic.rs
  156. +1 −1 src/test/run-pass/ret-none.rs
  157. +2 −2 src/test/run-pass/send-type-inference.rs
  158. +1 −1 src/test/run-pass/sendfn-deep-copy.rs
  159. +2 −2 src/test/run-pass/sendfn-generic-fn.rs
  160. +2 −2 src/test/run-pass/static-impl.rs
  161. +1 −1 src/test/run-pass/static-method-test.rs
  162. +2 −2 src/test/run-pass/trait-generic.rs
  163. +2 −2 src/test/run-pass/type-param-constraints.rs
  164. +1 −1 src/test/run-pass/uniq-cc-generic.rs
  165. +1 −1 src/test/run-pass/unique-assign-generic.rs
  166. +1 −1 src/test/run-pass/unique-generic-assign.rs
  167. +4 −4 src/test/run-pass/unique-kinds.rs
View
@@ -449,7 +449,7 @@ Two examples of paths with type arguments:
~~~~
# use std::map;
# fn f() {
-# fn id<T:copy>(t: T) -> T { t }
+# fn id<T:Copy>(t: T) -> T { t }
type t = map::hashmap<int,~str>; // Type arguments used in a type expression
let x = id::<int>(10); // Type arguments used in a call expression
# }
@@ -1056,7 +1056,7 @@ An example of a pure function that uses an unchecked block:
~~~~
# use std::list::*;
-fn pure_foldl<T, U: copy>(ls: List<T>, u: U, f: fn(&&T, &&U) -> U) -> U {
+fn pure_foldl<T, U: Copy>(ls: List<T>, u: U, f: fn(&&T, &&U) -> U) -> U {
match ls {
Nil => u,
Cons(hd, tl) => f(hd, pure_foldl(*tl, f(hd, u), f))
@@ -1110,7 +1110,7 @@ type can always be moved, but they can only be copied when the
parameter is given a [`copy` bound](#type-kinds).
~~~~
-fn id<T: copy>(x: T) -> T { x }
+fn id<T: Copy>(x: T) -> T { x }
~~~~
Similarly, [trait](#traits) bounds can be specified for type
@@ -2638,7 +2638,7 @@ Every struct item defines a type.
Within the body of an item that has type parameter declarations, the names of its type parameters are types:
~~~~~~~
-fn map<A: copy, B: copy>(f: fn(A) -> B, xs: ~[A]) -> ~[B] {
+fn map<A: Copy, B: Copy>(f: fn(A) -> B, xs: ~[A]) -> ~[B] {
if xs.len() == 0 { return ~[]; }
let first: B = f(xs[0]);
let rest: ~[B] = map(f, xs.slice(1, xs.len()));
@@ -2706,7 +2706,7 @@ Putting `x` into a shared box involves copying, and the `T` parameter
is assumed to be noncopyable. To change that, a bound is declared:
~~~~
-fn box<T: copy>(x: T) -> @T { @x }
+fn box<T: Copy>(x: T) -> @T { @x }
~~~~
Calling this second version of `box` on a noncopyable type is not
View
@@ -1583,20 +1583,20 @@ unless you explicitly declare that type parameter to have copyable
// This does not compile
fn head_bad<T>(v: ~[T]) -> T { v[0] }
// This does
-fn head<T: copy>(v: ~[T]) -> T { v[0] }
+fn head<T: Copy>(v: ~[T]) -> T { v[0] }
~~~~
When instantiating a generic function, you can only instantiate it
with types that fit its kinds. So you could not apply `head` to a
resource type. Rust has several kinds that can be used as type bounds:
-* `copy` - Copyable types. All types are copyable unless they
+* `Copy` - Copyable types. All types are copyable unless they
are classes with destructors or otherwise contain
classes with destructors.
-* `send` - Sendable types. All types are sendable unless they
+* `Send` - Sendable types. All types are sendable unless they
contain shared boxes, closures, or other local-heap-allocated
types.
-* `const` - Constant types. These are types that do not contain
+* `Const` - Constant types. These are types that do not contain
mutable fields nor shared boxes.
> ***Note:*** Rust type kinds are syntactically very similar to
@@ -2002,7 +2002,7 @@ and one for values. This means that this code is valid:
~~~~
mod buffalo {
type buffalo = int;
- fn buffalo<buffalo: copy>(buffalo: buffalo) -> buffalo { buffalo }
+ fn buffalo<buffalo>(+buffalo: buffalo) -> buffalo { buffalo }
}
fn main() {
let buffalo: buffalo::buffalo = 1;
View
@@ -239,7 +239,7 @@ fn check_variants_of_ast(crate: ast::crate, codemap: codemap::codemap,
pprust::ty_to_str, replace_ty_in_crate, cx);
}
-fn check_variants_T<T: copy>(
+fn check_variants_T<T: Copy>(
crate: ast::crate,
codemap: codemap::codemap,
filename: &Path,
View
@@ -89,7 +89,7 @@ pure fn build_sized_opt<A>(size: Option<uint>,
// Appending
#[inline(always)]
-pure fn append<T: copy>(lhs: @[T], rhs: &[const T]) -> @[T] {
+pure fn append<T: Copy>(lhs: @[T], rhs: &[const T]) -> @[T] {
do build_sized(lhs.len() + rhs.len()) |push| {
for vec::each(lhs) |x| { push(x); }
for uint::range(0, rhs.len()) |i| { push(rhs[i]); }
@@ -125,15 +125,15 @@ pure fn from_fn<T>(n_elts: uint, op: iter::InitOp<T>) -> @[T] {
* Creates an immutable vector of size `n_elts` and initializes the elements
* to the value `t`.
*/
-pure fn from_elem<T: copy>(n_elts: uint, t: T) -> @[T] {
+pure fn from_elem<T: Copy>(n_elts: uint, t: T) -> @[T] {
do build_sized(n_elts) |push| {
let mut i: uint = 0u;
while i < n_elts { push(t); i += 1u; }
}
}
#[cfg(notest)]
-impl<T: copy> @[T]: Add<&[const T],@[T]> {
+impl<T: Copy> @[T]: Add<&[const T],@[T]> {
#[inline(always)]
pure fn add(rhs: &[const T]) -> @[T] {
append(self, rhs)
View
@@ -48,7 +48,7 @@ export listen;
* transmitted. If a port value is copied, both copies refer to the same
* port. Ports may be associated with multiple `chan`s.
*/
-enum Port<T: send> {
+enum Port<T: Send> {
Port_(@PortPtr<T>)
}
@@ -64,16 +64,16 @@ enum Port<T: send> {
* data will be silently dropped. Channels may be duplicated and
* themselves transmitted over other channels.
*/
-enum Chan<T: send> {
+enum Chan<T: Send> {
Chan_(port_id)
}
/// Constructs a port
-fn Port<T: send>() -> Port<T> {
+fn Port<T: Send>() -> Port<T> {
Port_(@PortPtr(rustrt::new_port(sys::size_of::<T>() as size_t)))
}
-impl<T: send> Port<T> {
+impl<T: Send> Port<T> {
fn chan() -> Chan<T> { Chan(self) }
fn send(+v: T) { self.chan().send(v) }
@@ -82,7 +82,7 @@ impl<T: send> Port<T> {
}
-impl<T: send> Chan<T> {
+impl<T: Send> Chan<T> {
fn chan() -> Chan<T> { self }
fn send(+v: T) { send(self, v) }
@@ -92,12 +92,12 @@ impl<T: send> Chan<T> {
}
/// Open a new receiving channel for the duration of a function
-fn listen<T: send, U>(f: fn(Chan<T>) -> U) -> U {
+fn listen<T: Send, U>(f: fn(Chan<T>) -> U) -> U {
let po = Port();
f(po.chan())
}
-struct PortPtr<T:send> {
+struct PortPtr<T:Send> {
po: *rust_port,
drop unsafe {
do task::unkillable {
@@ -121,7 +121,7 @@ struct PortPtr<T:send> {
}
}
-fn PortPtr<T: send>(po: *rust_port) -> PortPtr<T> {
+fn PortPtr<T: Send>(po: *rust_port) -> PortPtr<T> {
PortPtr {
po: po
}
@@ -135,7 +135,7 @@ fn PortPtr<T: send>(po: *rust_port) -> PortPtr<T> {
* Fails if the port is detached or dead. Fails if the port
* is owned by a different task.
*/
-fn as_raw_port<T: send, U>(ch: comm::Chan<T>, f: fn(*rust_port) -> U) -> U {
+fn as_raw_port<T: Send, U>(ch: comm::Chan<T>, f: fn(*rust_port) -> U) -> U {
struct PortRef {
p: *rust_port,
@@ -167,15 +167,15 @@ fn as_raw_port<T: send, U>(ch: comm::Chan<T>, f: fn(*rust_port) -> U) -> U {
* Constructs a channel. The channel is bound to the port used to
* construct it.
*/
-fn Chan<T: send>(p: Port<T>) -> Chan<T> {
+fn Chan<T: Send>(p: Port<T>) -> Chan<T> {
Chan_(rustrt::get_port_id((**p).po))
}
/**
* Sends data over a channel. The sent data is moved into the channel,
* whereupon the caller loses access to it.
*/
-fn send<T: send>(ch: Chan<T>, +data: T) {
+fn send<T: Send>(ch: Chan<T>, +data: T) {
let Chan_(p) = ch;
let data_ptr = ptr::addr_of(data) as *();
let res = rustrt::rust_port_id_send(p, data_ptr);
@@ -190,22 +190,22 @@ fn send<T: send>(ch: Chan<T>, +data: T) {
* Receive from a port. If no data is available on the port then the
* task will block until data becomes available.
*/
-fn recv<T: send>(p: Port<T>) -> T { recv_((**p).po) }
+fn recv<T: Send>(p: Port<T>) -> T { recv_((**p).po) }
/// Returns true if there are messages available
-fn peek<T: send>(p: Port<T>) -> bool { peek_((**p).po) }
+fn peek<T: Send>(p: Port<T>) -> bool { peek_((**p).po) }
#[doc(hidden)]
-fn recv_chan<T: send>(ch: comm::Chan<T>) -> T {
+fn recv_chan<T: Send>(ch: comm::Chan<T>) -> T {
as_raw_port(ch, |x|recv_(x))
}
-fn peek_chan<T: send>(ch: comm::Chan<T>) -> bool {
+fn peek_chan<T: Send>(ch: comm::Chan<T>) -> bool {
as_raw_port(ch, |x|peek_(x))
}
/// Receive on a raw port pointer
-fn recv_<T: send>(p: *rust_port) -> T {
+fn recv_<T: Send>(p: *rust_port) -> T {
let yield = 0u;
let yieldp = ptr::addr_of(yield);
let mut res;
@@ -231,7 +231,7 @@ fn peek_(p: *rust_port) -> bool {
}
/// Receive on one of two ports
-fn select2<A: send, B: send>(p_a: Port<A>, p_b: Port<B>)
+fn select2<A: Send, B: Send>(p_a: Port<A>, p_b: Port<B>)
-> Either<A, B> {
let ports = ~[(**p_a).po, (**p_b).po];
let yield = 0u, yieldp = ptr::addr_of(yield);
View
@@ -96,7 +96,7 @@ pure fn from_elem<T>(+data: T) -> DList<T> {
list
}
-fn from_vec<T: copy>(+vec: &[T]) -> DList<T> {
+fn from_vec<T: Copy>(+vec: &[T]) -> DList<T> {
do vec::foldl(DList(), vec) |list,data| {
list.push(data); // Iterating left-to-right -- add newly to the tail.
list
@@ -417,7 +417,7 @@ impl<T> DList<T> {
}
}
-impl<T: copy> DList<T> {
+impl<T: Copy> DList<T> {
/// Remove data from the head of the list. O(1).
fn pop() -> Option<T> { self.pop_n().map (|nobe| nobe.data) }
/// Remove data from the tail of the list. O(1).
View
@@ -210,7 +210,7 @@ impl<A> DVec<A> {
}
}
-impl<A: copy> DVec<A> {
+impl<A: Copy> DVec<A> {
/**
* Append all elements of a vector to the end of the list
*
@@ -327,7 +327,7 @@ impl<A: copy> DVec<A> {
}
}
-impl<A:copy> DVec<A>: Index<uint,A> {
+impl<A:Copy> DVec<A>: Index<uint,A> {
pure fn index(&&idx: uint) -> A {
self.get_elt(idx)
}
View
@@ -29,7 +29,7 @@ fn either<T, U, V>(f_left: fn((&T)) -> V,
}
}
-fn lefts<T: copy, U>(eithers: &[Either<T, U>]) -> ~[T] {
+fn lefts<T: Copy, U>(eithers: &[Either<T, U>]) -> ~[T] {
//! Extracts from a vector of either all the left values
let mut result: ~[T] = ~[];
@@ -42,7 +42,7 @@ fn lefts<T: copy, U>(eithers: &[Either<T, U>]) -> ~[T] {
return result;
}
-fn rights<T, U: copy>(eithers: &[Either<T, U>]) -> ~[U] {
+fn rights<T, U: Copy>(eithers: &[Either<T, U>]) -> ~[U] {
//! Extracts from a vector of either all the right values
let mut result: ~[U] = ~[];
@@ -55,7 +55,7 @@ fn rights<T, U: copy>(eithers: &[Either<T, U>]) -> ~[U] {
return result;
}
-fn partition<T: copy, U: copy>(eithers: &[Either<T, U>])
+fn partition<T: Copy, U: Copy>(eithers: &[Either<T, U>])
-> {lefts: ~[T], rights: ~[U]} {
/*!
* Extracts from a vector of either all the left values and right values
@@ -75,7 +75,7 @@ fn partition<T: copy, U: copy>(eithers: &[Either<T, U>])
return {lefts: lefts, rights: rights};
}
-pure fn flip<T: copy, U: copy>(eith: &Either<T, U>) -> Either<U, T> {
+pure fn flip<T: Copy, U: Copy>(eith: &Either<T, U>) -> Either<U, T> {
//! Flips between left and right of a given either
match *eith {
@@ -84,7 +84,7 @@ pure fn flip<T: copy, U: copy>(eith: &Either<T, U>) -> Either<U, T> {
}
}
-pure fn to_result<T: copy, U: copy>(eith: &Either<T, U>) -> Result<U, T> {
+pure fn to_result<T: Copy, U: Copy>(eith: &Either<T, U>) -> Result<U, T> {
/*!
* Converts either::t to a result::t
*
View
@@ -43,7 +43,7 @@ priv enum FutureState<A> {
}
/// Methods on the `future` type
-impl<A:copy> Future<A> {
+impl<A:Copy> Future<A> {
fn get() -> A {
//! Get the value of the future
@@ -74,7 +74,7 @@ fn from_value<A>(+val: A) -> Future<A> {
Future {state: Forced(val)}
}
-fn from_port<A:send>(+port: future_pipe::client::waiting<A>) -> Future<A> {
+fn from_port<A:Send>(+port: future_pipe::client::waiting<A>) -> Future<A> {
/*!
* Create a future from a port
*
@@ -105,7 +105,7 @@ fn from_fn<A>(+f: @fn() -> A) -> Future<A> {
Future {state: Pending(f)}
}
-fn spawn<A:send>(+blk: fn~() -> A) -> Future<A> {
+fn spawn<A:Send>(+blk: fn~() -> A) -> Future<A> {
/*!
* Create a future from a unique closure.
*
@@ -156,7 +156,7 @@ fn get_ref<A>(future: &r/Future<A>) -> &r/A {
}
}
-fn get<A:copy>(future: &Future<A>) -> A {
+fn get<A:Copy>(future: &Future<A>) -> A {
//! Get the value of the future
*get_ref(future)
@@ -169,7 +169,7 @@ fn with<A,B>(future: &Future<A>, blk: fn((&A)) -> B) -> B {
}
proto! future_pipe (
- waiting:recv<T:send> {
+ waiting:recv<T:Send> {
completed(T) -> !
}
)
@@ -28,7 +28,7 @@ impl<A: Eq> IMPL_T<A>: iter::EqIter<A> {
}
}
-impl<A: copy> IMPL_T<A>: iter::CopyableIter<A> {
+impl<A: Copy> IMPL_T<A>: iter::CopyableIter<A> {
pure fn filter_to_vec(pred: fn(A) -> bool) -> ~[A] {
iter::filter_to_vec(self, pred)
}
@@ -45,7 +45,7 @@ impl<A: copy> IMPL_T<A>: iter::CopyableIter<A> {
pure fn find(p: fn(A) -> bool) -> Option<A> { iter::find(self, p) }
}
-impl<A: copy Ord> IMPL_T<A>: iter::CopyableOrderedIter<A> {
+impl<A: Copy Ord> IMPL_T<A>: iter::CopyableOrderedIter<A> {
pure fn min() -> A { iter::min(self) }
pure fn max() -> A { iter::max(self) }
}
Oops, something went wrong.

0 comments on commit 3bd1f32

Please sign in to comment.