rust/src/test/ui/issues/issue-23041.rs
2018-12-25 21:08:33 -07:00

8 lines
164 B
Rust

use std::any::Any;
fn main()
{
fn bar(x:i32) ->i32 { 3*x };
let b:Box<Any> = Box::new(bar as fn(_)->_);
b.downcast_ref::<fn(_)->_>(); //~ ERROR E0282
}