mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
8 lines
168 B
Rust
8 lines
168 B
Rust
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
|
|
}
|