]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/issue-2862.rs
Merge pull request #3918 from matthiaskrgr/typos
[rust.git] / tests / ui / crashes / issue-2862.rs
1 // run-pass
2
3 /// Test for https://github.com/rust-lang/rust-clippy/issues/2826
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 }