]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/generic-fn-infer.rs
Use different syntax for checks that matter to typestate
[rust.git] / src / test / run-pass / generic-fn-infer.rs
1 // -*- rust -*-
2
3 // Issue #45: infer type parameters in function applications
4
5 fn id[T](&T x) -> T {
6   ret x;
7 }
8
9 fn main() {
10   let int x = 42;
11   let int y = id(x);
12   assert (x == y);
13 }