about summary refs log tree commit diff
path: root/src/libcore/util.rs
diff options
context:
space:
mode:
authorBen Blum <bblum@andrew.cmu.edu>2012-08-07 14:16:51 -0400
committerBen Blum <bblum@andrew.cmu.edu>2012-08-07 14:26:41 -0400
commit0cc6cefaec4cedfc91ec7de447e116e6eba82915 (patch)
treea619191ba4f7e3fc0ed27580181bd69e778085a3 /src/libcore/util.rs
parentefea6f016eacf258e7b6bdaa960a39b3e7f91fa5 (diff)
downloadrust-0cc6cefaec4cedfc91ec7de447e116e6eba82915.tar.gz
rust-0cc6cefaec4cedfc91ec7de447e116e6eba82915.zip
Add util::ignore
Diffstat (limited to 'src/libcore/util.rs')
-rw-r--r--src/libcore/util.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/util.rs b/src/libcore/util.rs
index 9b7a644b508..0f6c852ddcb 100644
--- a/src/libcore/util.rs
+++ b/src/libcore/util.rs
@@ -5,6 +5,9 @@
 /// The identity function.
 pure fn id<T>(+x: T) -> T { x }
 
+/// Ignores a value.
+pure fn ignore<T>(+_x: T) { }
+
 /**
  * Swap the values at two mutable locations of the same type, without
  * deinitialising or copying either one.