blob: 5e026ea4096c30429a47ea531ca73e8ad19b3c49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
fn hi() -> impl Sized {
std::ptr::null::<u8>()
}
fn main() {
let b: Box<dyn Fn() -> Box<u8>> = Box::new(hi);
//~^ ERROR expected `hi` to be a fn item that returns `Box<u8>`, but it returns `impl Sized`
let boxed = b();
let null = *boxed;
println!("{null:?}");
}
|