From 41a4ce52dd69659a1da859604eb02ebe7005d54f Mon Sep 17 00:00:00 2001 From: Alexander Shabalin Date: Mon, 10 Jun 2019 20:19:29 +0300 Subject: [PATCH] Workaround for rust-lang/rustfmt#3615 --- tests/ui/eta.fixed | 2 +- tests/ui/eta.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ui/eta.fixed b/tests/ui/eta.fixed index ca1ccad29f2..0d91bb2cfe7 100644 --- a/tests/ui/eta.fixed +++ b/tests/ui/eta.fixed @@ -178,7 +178,7 @@ fn test_redundant_closure_with_another_closure() { let a = Some(1u8).map(closure); } -fn make_lazy(f: fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 { +fn make_lazy(f: impl Fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 { // Currently f is called when result of make_lazy is called. // If the closure is removed, f will be called when make_lazy itself is // called. This changes semantics, so the closure must stay. diff --git a/tests/ui/eta.rs b/tests/ui/eta.rs index f736543dc1b..b2f7592bdb8 100644 --- a/tests/ui/eta.rs +++ b/tests/ui/eta.rs @@ -178,7 +178,7 @@ fn test_redundant_closure_with_another_closure() { let a = Some(1u8).map(|a| closure(a)); } -fn make_lazy(f: fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 { +fn make_lazy(f: impl Fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 { // Currently f is called when result of make_lazy is called. // If the closure is removed, f will be called when make_lazy itself is // called. This changes semantics, so the closure must stay.