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`.