-
Notifications
You must be signed in to change notification settings - Fork 484
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
Conversation
I'm a bit uncertain about why it would call out |
Yes, they are. Interestingly, though, (I'm not sure this is wrong, but it's interesting.) I forgot about |
A drive-by developer here. @alercah There is no "unsafe closure" actually. For the But I think this PR maybe useful. Since the rustc currently support coercing |
I do not think of
|
What about impls? |
@alercah I don't really understand your question, can you elaborate? |
I think that the perspective that unsafe fn isn't really a distinct type,
and unsafe isbjust a marker, doesn't really hold up when given examples
like that you can define trait impls on fn types and unsafe fn types
separately.
Since this is a reference, I think accuracy should be valued over intuition
or pedagogy---not that those things aren't important, but they can't be the
first priority.
…On Wed., Jun. 10, 2020, 09:01 Niko Matsakis, ***@***.***> wrote:
@alercah <https://github.com/alercah> I don't really understand your
question, can you elaborate?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#802 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE7AOVIM5M45EY5ZMBH27YDRV5733ANCNFSM4MJELWYA>
.
|
I see. Well, I guess it depends on what one means by "a separate type". I see "function pointer types" as a family of types, I suppose, parameterized by various things:
much as a type like If we were going for completeness, I don't think that " |
what do you think about this? :) |
Ah, I see. That makes sense to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in suggestion form
@ehuss how do I merge, just click the green button? :) |
Yes, after marking "approved" just click the merge button. 😃 |
Update books ## reference 7 commits in b329ce37424874ad4db94f829a55807c6e21d2cb..c9b2736a059469043177e1e4ed41a55d7c63ac28 2020-07-20 08:54:08 -0700 to 2020-08-03 03:34:03 -0700 - Fix documented build output path. (rust-lang/reference#870) - Update token usage table. (rust-lang/reference#868) - Allow trait inner attributes (rust-lang/reference#864) - patterns.md - add word "underscore" to _ paragraph (rust-lang/reference#865) - Drive-by mention unsafe fn closure coercion (rust-lang/reference#802) - grammar: Change "For awhile" to "For a while" (rust-lang/reference#857) - Added Unpin to list of Auto Traits (rust-lang/reference#854) ## book 7 commits in a914f2c7e5cdb771fa465de142381a51c53b580e..363293c1c5ce9e84ea3935a5e29ce8624801208a 2020-07-21 09:20:05 -0500 to 2020-08-03 15:56:30 -0500 - replace commas with m-dashes to improve readability of chapter 4.1 (rust-lang/book#2419) - Update TOML link to official website (rust-lang/book#2411) - Add github repo link (rust-lang/book#2265) - Remove the version number entirely so we can stop updating it - Add link to the `Vec<T>` API documentation (rust-lang/book#2249) - link to stdlib atomic docs (rust-lang/book#2361) - mdbook version used is now 0.4.x (rust-lang/book#2410) ## rust-by-example 1 commits in 229c6945a26a53a751ffa4f9cb418388c00029d3..2e9271981adc32613365810f3428334c07095215 2020-07-06 10:13:15 -0300 to 2020-07-27 13:39:16 -0500 - Replaced "princess" with "royal" (rust-lang/rust-by-example#1363) ## embedded-book 1 commits in 94d9ea8460bcbbbfef1877b47cb930260b5849a7..b5256448a2a4c1bec68b93c0847066f92f2ff5a9 2020-07-05 14:17:40 +0000 to 2020-07-24 23:09:29 +0000 - Update c-with-rust.md (rust-embedded/book#256)
Update books ## reference 7 commits in b329ce37424874ad4db94f829a55807c6e21d2cb..c9b2736a059469043177e1e4ed41a55d7c63ac28 2020-07-20 08:54:08 -0700 to 2020-08-03 03:34:03 -0700 - Fix documented build output path. (rust-lang/reference#870) - Update token usage table. (rust-lang/reference#868) - Allow trait inner attributes (rust-lang/reference#864) - patterns.md - add word "underscore" to _ paragraph (rust-lang/reference#865) - Drive-by mention unsafe fn closure coercion (rust-lang/reference#802) - grammar: Change "For awhile" to "For a while" (rust-lang/reference#857) - Added Unpin to list of Auto Traits (rust-lang/reference#854) ## book 7 commits in a914f2c7e5cdb771fa465de142381a51c53b580e..363293c1c5ce9e84ea3935a5e29ce8624801208a 2020-07-21 09:20:05 -0500 to 2020-08-03 15:56:30 -0500 - replace commas with m-dashes to improve readability of chapter 4.1 (rust-lang/book#2419) - Update TOML link to official website (rust-lang/book#2411) - Add github repo link (rust-lang/book#2265) - Remove the version number entirely so we can stop updating it - Add link to the `Vec<T>` API documentation (rust-lang/book#2249) - link to stdlib atomic docs (rust-lang/book#2361) - mdbook version used is now 0.4.x (rust-lang/book#2410) ## rust-by-example 1 commits in 229c6945a26a53a751ffa4f9cb418388c00029d3..2e9271981adc32613365810f3428334c07095215 2020-07-06 10:13:15 -0300 to 2020-07-27 13:39:16 -0500 - Replaced "princess" with "royal" (rust-lang/rust-by-example#1363) ## embedded-book 1 commits in 94d9ea8460bcbbbfef1877b47cb930260b5849a7..b5256448a2a4c1bec68b93c0847066f92f2ff5a9 2020-07-05 14:17:40 +0000 to 2020-07-24 23:09:29 +0000 - Update c-with-rust.md (rust-embedded/book#256)
No description provided.