mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-30 02:02:52 +00:00
14 lines
221 B
Rust
14 lines
221 B
Rust
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);
|
|
}
|