Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
closures
/
closure-wrong-kind.rs
blob: 9bf38bfb66b6222efb80904d9585c669f707ed19 [
file
] [
log
] [
blame
] [
edit
]
/* 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
);
}