rust/src/test/ui/issues/issue-21701.rs
2018-12-25 21:08:33 -07:00

16 lines
211 B
Rust

fn foo<U>(t: U) {
let y = t();
//~^ ERROR: expected function, found `U`
}
struct Bar;
pub fn some_func() {
let f = Bar();
//~^ ERROR: expected function, found `Bar`
}
fn main() {
foo(|| { 1 });
}