summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/print/closure-print-generic-2.rs
blob: 3f77fd26b1772ca4e1265f6ab6c4209ece935efe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
mod mod1 {
    pub fn f<T: std::fmt::Display>(t: T) {
        let x = 20;

        let c = || println!("{} {}", t, x);
        let c1: () = c;
        //~^ ERROR mismatched types
    }
}

fn main() {
    mod1::f(5i32);
}