-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Rename Send trait to Owned #3542
Comments
Also, per @nikomatsakis, the current |
I am somewhat confused by this. As I understand it, today, With this change, would we forbid storing @ pointers in TLS (restrictive)? Would we allow storing & pointers in TLS (unsound)? I must be missing something. |
The current |
oh, it will just be renamed also? |
@nikomatsakis believes that further refinements to borrowed pointers will make the current |
I strongly agree with not having const have so many overloaded meanings. To be honest, I think const-the-mutability-qualifier is the odd man out here, and I would like to change it to something else, but I don't know what ( That said, I think Freeze may not be the right name for the trait we currently call Const. Here is my reasoning: a freezable data structure is one which is based purely on owned data and with no explicit mutable qualifiers. This is currently described by Now, it is not clear to me whether a trait that means "immutable" is necessary on its own. @pcwalton and I have talked about some ideas for removing pure functions and replacing them with closures with a "Const" bound, so it'd be important then. The best name I can come up for to replace Const is Imm (for Immutable, which seems a touch long), even though it is true that an instance of an Imm type, when placed in a mutable local variable (or other mutable context), is in fact mutable. But somehow |
@nikomatsakis I expect you meant to reply to #3949? in any case, I wonder: is there any place we use It seems to me we should either (a) make const/send/owned such that each one implies the next (which means If there is a use case for |
@bblum yes, yes I did. :) Regarding uses of |
ah, I must have skipped that paragraph. How would the const bound replace purity? (I assume that means something different than the limitation in #3569.)
|
Implemented |
run clippy on a Windows host Fixes rust-lang/miri#3324
run clippy on a Windows host Fixes rust-lang/miri#3324
The concepts around the core language are much clearer now than when we added the kind system. At the time I was disappointed about including the notion of 'sendability' in the language, while all the actual sending was going on in libraries. Now we have a much better term for sendable things, 'owned', and owning a thing is useful for more than just sending.
If we want we can keep a
Send
trait that derives fromOwned
to use in the comms mods. This would require tagging types as Send, which may or may not be desirable. Regardless,Send
should be demoted.Owned
2012.The text was updated successfully, but these errors were encountered: