about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorLenny222 <github@kudling.de>2012-01-17 19:43:29 +0100
committerNiko Matsakis <niko@alum.mit.edu>2012-01-17 10:51:43 -0800
commitb19fdcced22d36bd50974e1da3062439e8a656b2 (patch)
tree86eec2a7af794cfcdba23cccf7521b9c7f7e6420 /src/libstd
parent106dcf7b925a1ac654d5df36ea6227fead493124 (diff)
downloadrust-b19fdcced22d36bd50974e1da3062439e8a656b2.tar.gz
rust-b19fdcced22d36bd50974e1da3062439e8a656b2.zip
libstd => libcore
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/std.rc3
-rw-r--r--src/libstd/tuple.rs28
2 files changed, 1 insertions, 30 deletions
diff --git a/src/libstd/std.rc b/src/libstd/std.rc
index 34297b1aaef..d96b6b7b666 100644
--- a/src/libstd/std.rc
+++ b/src/libstd/std.rc
@@ -12,7 +12,7 @@ export c_vec, four, tri, util;
 export bitv, deque, fun_treemap, list, map, smallintmap, sort, treemap, ufind;
 export rope;
 export ebml, dbg, getopts, json, rand, sha1, term, time;
-export extfmt, test, tempfile, tuple;
+export extfmt, test, tempfile;
 // FIXME: generic_os and os_fs shouldn't be exported
 export generic_os, os, os_fs;
 
@@ -61,7 +61,6 @@ mod md4;
 mod tempfile;
 mod term;
 mod time;
-mod tuple;
 
 #[cfg(unicode)]
 mod unicode;
diff --git a/src/libstd/tuple.rs b/src/libstd/tuple.rs
deleted file mode 100644
index 9d24f428d42..00000000000
--- a/src/libstd/tuple.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-Module: tuple
-*/
-
-// FIXME #1546: Would rather write fst<T, U>(+pair: (T, U)) -> T
-fn first<T:copy, U:copy>(pair: (T, U)) -> T {
-    let (t, _) = pair;
-    ret t;
-}
-
-fn second<T:copy, U:copy>(pair: (T, U)) -> U {
-    let (_, u) = pair;
-    ret u;
-}
-
-fn swap<T:copy, U:copy>(pair: (T, U)) -> (U, T) {
-    let (t, u) = pair;
-    ret (u, t);
-}
-
-
-#[test]
-fn test_tuple() {
-    assert first((948, 4039.48)) == 948;
-    assert second((34.5, "foo")) == "foo";
-    assert swap(('a', 2)) == (2, 'a');
-}
-