2011-10-13 16:07:57 -05:00
|
|
|
// error-pattern: generic bare functions can only be called or bound
|
|
|
|
// Issue #1038
|
|
|
|
|
|
|
|
fn main() {
|
2011-10-20 22:34:04 -05:00
|
|
|
fn foo<T>() { }
|
2011-10-13 16:07:57 -05:00
|
|
|
|
|
|
|
// This wants to build a closure over type int,
|
|
|
|
// but there's no way to do that while still being a bare function
|
2011-10-20 22:34:04 -05:00
|
|
|
let f: fn() = foo::<int>;
|
2011-10-13 16:07:57 -05:00
|
|
|
}
|