Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drive-by mention unsafe fn closure coercion #802

Merged
merged 2 commits into from
Jul 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/types/closure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
nikomatsakis marked this conversation as resolved.
Show resolved Hide resolved
with the matching signature.

```rust
let add = |x, y| x + y;
Expand Down