From d0ab22d4a4c19df7f2f172a8fc22824ae817cab5 Mon Sep 17 00:00:00 2001 From: Alexis Hunt Date: Thu, 16 Apr 2020 00:18:02 -0400 Subject: [PATCH 1/2] Drive-by mention unsafe fn closure coercion --- src/types/closure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/closure.md b/src/types/closure.md index 520d90480..8183c4101 100644 --- a/src/types/closure.md +++ b/src/types/closure.md @@ -131,8 +131,8 @@ more specific call traits: > not how it captures them. *Non-capturing closures* are closures that don't capture anything from their -environment. They can be coerced to function pointers (`fn`) with the matching -signature. +environment. They can be coerced to function pointers (`fn` or `unsafe fn`) +with the matching signature. ```rust let add = |x, y| x + y; From f7407836bbd7455d686d92e3fd9b9c9b64fa5f12 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 29 Jul 2020 12:07:37 -0400 Subject: [PATCH 2/2] Update src/types/closure.md --- src/types/closure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/closure.md b/src/types/closure.md index 8183c4101..dea0b79cd 100644 --- a/src/types/closure.md +++ b/src/types/closure.md @@ -131,7 +131,7 @@ more specific call traits: > not how it captures them. *Non-capturing closures* are closures that don't capture anything from their -environment. They can be coerced to function pointers (`fn` or `unsafe fn`) +environment. They can be coerced to function pointers (e.g., `fn()`) with the matching signature. ```rust