parent
6a7800508b
commit
60cfa91897
1 changed files with 10 additions and 0 deletions
10
src/test/run-pass/fn-bare-bind-generic.rs
Normal file
10
src/test/run-pass/fn-bare-bind-generic.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
fn# f<T>(i: T, j: T, k: T) {
|
||||
assert i == j;
|
||||
assert j != k;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// Binding a bare function turns it into a shared closure
|
||||
let g: fn() = bind f(10, 10, 20);
|
||||
g();
|
||||
}
|
Loading…
Reference in a new issue