mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-19 03:54:40 +00:00
16 lines
218 B
Rust
16 lines
218 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 struct `Bar`
|
|
}
|
|
|
|
fn main() {
|
|
foo(|| { 1 });
|
|
}
|