]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/print/closure-print-generic-verbose-2.rs
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / tests / ui / closures / print / closure-print-generic-verbose-2.rs
1 // compile-flags: -Zverbose
2
3 mod mod1 {
4     pub fn f<T: std::fmt::Display>(t: T)
5     {
6         let x = 20;
7
8         let c = || println!("{} {}", t, x);
9         let c1 : () = c;
10         //~^ ERROR mismatched types
11     }
12 }
13
14 fn main() {
15     mod1::f(5i32);
16 }