rust/tests/ui/suggestions/use-parentheses-to-call-closure-issue-145404.rs
2025-08-16 15:01:17 +08:00

14 lines
159 B
Rust

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