]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/crashes/ice-2862.rs
Rollup merge of #86263 - fee1-dead:rustdoc-layout-variants, r=camelid
[rust.git] / src / tools / clippy / tests / ui / crashes / ice-2862.rs
1 /// Test for https://github.com/rust-lang/rust-clippy/issues/2862
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 }