]> git.proxmox.com Git - rustc.git/blob - tests/ui/closures/print/closure-print-verbose.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / closures / print / closure-print-verbose.rs
1 // compile-flags: -Zverbose
2
3 // Same as closure-coerce-fn-1.rs
4
5 // Ensure that capturing closures are never coerced to fns
6 // Especially interesting as non-capturing closures can be.
7
8 fn main() {
9 let mut a = 0u8;
10 let foo: fn(u8) -> u8 = |v: u8| { a += v; a };
11 //~^ ERROR mismatched types
12 }