mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
13 lines
261 B
Rust
13 lines
261 B
Rust
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
struct X;
|
|
fn foo<T>(_: T) {}
|
|
fn bar<T: Fn(u32)>(_: T) {}
|
|
|
|
fn main() {
|
|
let x = X;
|
|
let closure = |_| foo(x); //~ ERROR E0525
|
|
bar(closure);
|
|
}
|