summaryrefslogtreecommitdiffstats
path: root/tests/ui/type/issue-58355.rs
blob: 3b62fdece403b922c15a37a532c20997e35f24e5 (plain)
1
2
3
4
5
6
7
#![crate_type = "lib"]

pub fn foo(callback: fn() -> dyn ToString) {
    let mut x: Option<Box<dyn Fn() -> dyn ToString>> = None;
    x = Some(Box::new(callback));
    //~^ ERROR: the size for values of type `dyn ToString` cannot be known at compilation time
}