]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/closure-no-fn-2.rs
Rollup merge of #106563 - clubby789:gce-macro-braces, r=TaKO8Ki
[rust.git] / tests / ui / closures / closure-no-fn-2.rs
1 // Ensure that capturing closures are never coerced to fns
2 // Especially interesting as non-capturing closures can be.
3
4 fn main() {
5     let b = 0u8;
6     let bar: fn() -> u8 = || { b };
7     //~^ ERROR mismatched types
8 }