Files
rust/tests/ui/suggestions/suggest-boxed-empty-block.rs

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

11 lines
193 B
Rust
Raw Normal View History

//@ edition:2021
//@ run-rustfix
fn foo<T>(_: Box<T>) {}
fn bar<T>(_: impl Fn() -> Box<T>) {}
fn main() {
foo({}); //~ ERROR mismatched types
bar(|| {}); //~ ERROR mismatched types
}