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.
17 lines
281 B
Rust
17 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);
|
|
}
|