Skip to content

Commit 41a4ce5

Browse files
committed
Workaround for rust-lang/rustfmt#3615
1 parent 86bab94 commit 41a4ce5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/ui/eta.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ fn test_redundant_closure_with_another_closure() {
178178
let a = Some(1u8).map(closure);
179179
}
180180

181-
fn make_lazy(f: fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 {
181+
fn make_lazy(f: impl Fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 {
182182
// Currently f is called when result of make_lazy is called.
183183
// If the closure is removed, f will be called when make_lazy itself is
184184
// called. This changes semantics, so the closure must stay.

tests/ui/eta.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ fn test_redundant_closure_with_another_closure() {
178178
let a = Some(1u8).map(|a| closure(a));
179179
}
180180

181-
fn make_lazy(f: fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 {
181+
fn make_lazy(f: impl Fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 {
182182
// Currently f is called when result of make_lazy is called.
183183
// If the closure is removed, f will be called when make_lazy itself is
184184
// called. This changes semantics, so the closure must stay.

0 commit comments

Comments
 (0)