mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-27 21:24:34 +00:00
24 lines
956 B
Plaintext
24 lines
956 B
Plaintext
error[E0277]: `{closure@$DIR/use-parentheses-to-call-closure-issue-145404.rs:12:12: 12:14}` doesn't implement `std::fmt::Display`
|
|
--> $DIR/use-parentheses-to-call-closure-issue-145404.rs:12:12
|
|
|
|
|
LL | S.call(|| "hello");
|
|
| ---- ^^^^^^^^^^ unsatisfied trait bound
|
|
| |
|
|
| required by a bound introduced by this call
|
|
|
|
|
= help: the trait `std::fmt::Display` is not implemented for closure `{closure@$DIR/use-parentheses-to-call-closure-issue-145404.rs:12:12: 12:14}`
|
|
note: required by a bound in `S::call`
|
|
--> $DIR/use-parentheses-to-call-closure-issue-145404.rs:8:28
|
|
|
|
|
LL | fn call(&self, _: impl Display) {}
|
|
| ^^^^^^^ required by this bound in `S::call`
|
|
help: use parentheses to call this closure
|
|
|
|
|
LL - S.call(|| "hello");
|
|
LL + S.call((|| "hello")());
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|