aboutsummaryrefslogtreecommitdiff
path: root/src/lib/util.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-02 12:03:46 -0700
committerGraydon Hoare <[email protected]>2010-07-02 12:03:46 -0700
commit41fa7a404eeb0ea786b6bd76f35860784fbcb4be (patch)
treee72da0c716e2ee0095c15cf2dbf55e2f683658a1 /src/lib/util.rs
parentParse effect-qualified type definitions. (diff)
parentAllow formatting individual decl_params (diff)
downloadrust-41fa7a404eeb0ea786b6bd76f35860784fbcb4be.tar.xz
rust-41fa7a404eeb0ea786b6bd76f35860784fbcb4be.zip
Merge branch 'exterior_and_mutable_types' of [email protected]:graydon/rust into exterior_and_mutable_types
Diffstat (limited to 'src/lib/util.rs')
-rw-r--r--src/lib/util.rs26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/lib/util.rs b/src/lib/util.rs
index bf57bb52..e0e52c8f 100644
--- a/src/lib/util.rs
+++ b/src/lib/util.rs
@@ -1,8 +1,4 @@
type option[T] = tag(none(), some(T));
-type box[T] = tup(@T);
-type boxo[T] = option[box[T]];
-type boxm[T] = tup(mutable @T);
-type boxmo[T] = option[boxm[T]];
type map[T, U] = fn(&T) -> U;
@@ -17,28 +13,6 @@ fn option_map[T, U](map[T, U] f, &option[T] opt) -> option[U] {
}
}
-fn unbox[T](&box[T] b) -> T {
- ret b._0;
-}
-
-
-fn unboxm[T](&boxm[T] b) -> T {
- ret b._0;
-}
-
-fn unboxo[T](boxo[T] b) -> option[T] {
- // Pending issue #90, no need to alias the function item in order to pass
- // it as an arg.
- let map[box[T], T] f = unbox[T];
- be option_map[box[T], T](f, b);
-}
-
-fn unboxmo[T](boxmo[T] b) -> option[T] {
- // Issue #90, as above
- let map[boxm[T], T] f = unboxm[T];
- be option_map[boxm[T], T](f, b);
-}
-
fn id[T](T x) -> T {
ret x;
}