Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
issues
/
issue-23041.rs
blob: a1371521a0aa03c346e0fc5d704e7cf22a0328b6 [
file
] [
log
] [
blame
] [
edit
]
use
std
::
any
::
Any
;
fn
main
()
{
fn
bar
(
x
:
i32
)
->
i32
{
3
*
x
};
let
b
:
Box
<
dyn
Any
>
=
Box
::
new
(
bar
as
fn
(
_
)->
_
);
b
.
downcast_ref
::<
fn
(
_
)->
_
>();
//~ ERROR E0282
}