Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
suggestions
/
suggest-boxed-empty-block.fixed
blob: 25cb4dc74b1136247321f9086a8f3bf34a783c96 [
file
] [
log
] [
blame
] [
edit
]
#![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
}