rust/tests/ui/suggestions/suggest-boxed-empty-block.fixed

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

13 lines
241 B
Rust
Raw Permalink Normal View History

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