aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-10-10 00:14:26 -0700
committerGraydon Hoare <[email protected]>2010-10-10 00:14:26 -0700
commitcaaf8679d8d22d75511fb0fc2adef585990ef397 (patch)
tree4d453d134514ffb2393eb7e7331c59b357a2f3e8 /src/test/run-pass
parentSubject copying code to inline heuristic, cut 30kb from rustc. (diff)
downloadrust-caaf8679d8d22d75511fb0fc2adef585990ef397.tar.xz
rust-caaf8679d8d22d75511fb0fc2adef585990ef397.zip
Teach bind to actually bind typarams, as it claims to.
Diffstat (limited to 'src/test/run-pass')
-rw-r--r--src/test/run-pass/generic-bind.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/run-pass/generic-bind.rs b/src/test/run-pass/generic-bind.rs
new file mode 100644
index 00000000..851f2831
--- /dev/null
+++ b/src/test/run-pass/generic-bind.rs
@@ -0,0 +1,8 @@
+fn id[T](T t) -> T {
+ ret t;
+}
+
+fn main() {
+ auto f = bind id[int](_);
+ check (f(10) == 10);
+} \ No newline at end of file