mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
17 lines
255 B
Rust
17 lines
255 B
Rust
// compile-flags: -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);
|
|
}
|