]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/crashes/ice-2862.rs
Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyup
[rust.git] / src / tools / clippy / tests / ui / crashes / ice-2862.rs
1 // run-pass
2
3 /// Test for https://github.com/rust-lang/rust-clippy/issues/2862
4
5 pub trait FooMap {
6     fn map<B, F: Fn() -> B>(&self, f: F) -> B;
7 }
8
9 impl FooMap for bool {
10     fn map<B, F: Fn() -> B>(&self, f: F) -> B {
11         f()
12     }
13 }
14
15 fn main() {
16     let a = true;
17     a.map(|| false);
18 }