Skip to content

Commit

Permalink
Workaround for rust-lang/rustfmt#3615
Browse files Browse the repository at this point in the history
  • Loading branch information
projedi committed Jun 10, 2019
1 parent 86bab94 commit 41a4ce5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/ui/eta.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/eta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 41a4ce5

Please sign in to comment.