rust/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
283 B
Rust
Raw Normal View History

// compile-flags: -Ztrim-diagnostic-paths=off -Zverbose
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);
}