mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-02 17:40:13 +00:00
a586f52a0f
This should give us more UI coverage for free. It also removes the `run-pass` suite, so we now only have the `ui` suite.
16 lines
281 B
Rust
16 lines
281 B
Rust
/// Test for https://github.com/rust-lang/rust-clippy/issues/2826
|
|
|
|
pub trait FooMap {
|
|
fn map<B, F: Fn() -> B>(&self, f: F) -> B;
|
|
}
|
|
|
|
impl FooMap for bool {
|
|
fn map<B, F: Fn() -> B>(&self, f: F) -> B {
|
|
f()
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let a = true;
|
|
a.map(|| false);
|
|
}
|