]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/issue-2862.rs
Auto merge of #3740 - flip1995:const_assert_macro, r=oli-obk
[rust.git] / tests / ui / crashes / issue-2862.rs
1 /// Test for https://github.com/rust-lang/rust-clippy/issues/2826
2
3 pub trait FooMap {
4     fn map<B, F: Fn() -> B>(&self, f: F) -> B;
5 }
6
7 impl FooMap for bool {
8     fn map<B, F: Fn() -> B>(&self, f: F) -> B {
9         f()
10     }
11 }
12
13 fn main() {
14     let a = true;
15     a.map(|| false);
16 }