rust/tests/ui/issues/issue-21701.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
218 B
Rust
Raw Normal View History

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 });
}