Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
suggestions
/
fn-ctor-passed-as-arg-where-it-should-have-been-called.rs
blob: 156f37f9e69bf0f69efc3f0070f20b5358c8ea1b [
file
] [
log
] [
blame
] [
edit
]
//@ edition:2018
trait
T
{
type
O
;
}
struct
S
;
impl
T
for
S
{
type
O
=
();
}
fn
foo
()
->
impl
T
<
O
=()>
{
S
}
fn
bar
(
f
:
impl
T
<
O
=()>)
{}
fn
main
()
{
bar
(
foo
);
//~ERROR E0277
let
closure
=
||
S
;
bar
(
closure
);
//~ERROR E0277
}