Sign in
rust
/
rust-lang
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
tests
/
ui
/
suggestions
/
suggest-boxed-empty-block.fixed
blob: a43e4405a7616380efc6c744608dc4e158c25389 [
file
] [
log
] [
blame
]
//@ 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
}