blob: 5612ccd6caed2024f71e178dedc197bd35e455fc (
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 return `Box<u8>`, but it returns `impl Sized`
let boxed = b();
let null = *boxed;
println!("{null:?}");
}
|