Files
rust/tests/ui/traits/dont-suggest-impl-as-closure-arg.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
230 B
Rust
Raw Normal View History

// Suggestion to use impl trait in closure parameter is invalid, see issue 138932
fn main() {
let c = |f: dyn Fn()| f();
//~^ ERROR: the size for values of type `(dyn Fn() + 'static)` cannot be known at compilation time
}