about summary refs log tree commit diff
path: root/tests/ui/suggestions/suggest-boxed-empty-block.rs
blob: 47fb08e4d11f55b9b1d474508c06391f03bc45cc (plain)
1
2
3
4
5
6
7
8
9
10
//@ 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
}