rust/tests/ui/suggestions/use-parentheses-to-call-closure-issue-145404.fixed

14 lines
163 B
Rust

//@ run-rustfix
use std::fmt::Display;
struct S;
impl S {
fn call(&self, _: impl Display) {}
}
fn main() {
S.call((|| "hello")()); //~ ERROR [E0277]
}