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

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

8 lines
157 B
Rust
Raw Normal View History

//@ run-pass
struct GradFn<F: Fn() -> usize>(F);
fn main() {
let GradFn(x_squared) : GradFn<_> = GradFn(|| -> usize { 2 });
let _ = x_squared();
}