about summary refs log tree commit diff
path: root/tests/ui/closures/capture-unsized-by-move.rs
blob: 72f6a5501e83ce202ed97dfd352e078a336f9f08 (plain)
1
2
3
4
5
6
7
8
9
10
//@ compile-flags: --crate-type=lib

#![feature(unsized_fn_params)]

pub fn f(k: dyn std::fmt::Display) {
    let k2 = move || {
        k.to_string();
        //~^ ERROR the size for values of type `(dyn std::fmt::Display + 'static)` cannot be known at compilation time
    };
}