blob: b71debac7156d12c4acd82e4da99f8e867dfecf0 [file] [log] [blame] [edit]
error[E0277]: the trait bound `fn() {main}: Foo` is not satisfied
--> $DIR/suggest-wrap-parens.rs:8:24
|
LL | let _x: &dyn Foo = &main;
| ^^^^^ the trait `Foo` is not implemented for fn item `fn() {main}`
|
= note: required for the cast from `&fn() {main}` to `&dyn Foo`
help: the trait `Foo` is implemented for fn pointer `fn()`, try casting using `as`
|
LL | let _x: &dyn Foo = &(main as fn());
| + ++++++++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.