]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-no-fn-2.rs
Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup
[rust.git] / src / test / 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 }