]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsized-locals/box-fnonce.rs
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / unsized-locals / box-fnonce.rs
1 // run-pass
2
3 fn call_it<T>(f: Box<dyn FnOnce() -> T>) -> T {
4     f()
5 }
6
7 fn main() {
8     let s = "hello".to_owned();
9     assert_eq!(&call_it(Box::new(|| s)) as &str, "hello");
10 }