Sign in
rust
/
rust-lang
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
tests
/
ui
/
suggestions
/
call-on-unimplemented-fn-ptr.rs
blob: 86490c724e0183627edac8e71b62e8a17ccd2eb0 [
file
] [
log
] [
blame
]
struct
Foo
;
trait
Bar
{}
impl
Bar
for
Foo
{}
fn
needs_bar
<
T
:
Bar
>(
_
:
T
)
{}
fn
blah
(
f
:
fn
()
->
Foo
)
{
needs_bar
(
f
);
//~^ ERROR the trait bound `fn() -> Foo: Bar` is not satisfied
//~| HELP use parentheses to call this function pointer
}
fn
main
()
{}