-
Notifications
You must be signed in to change notification settings - Fork 340
Conversation
OMG awesome. |
"Feature gates" are attributes that enable the usage of unstable language | ||
features. They can only be activated on the nightly channel, and allow | ||
developers to opt into experimental features before they are stabilized. | ||
Feature gates follow the same stabilization procedure as the standard library. |
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.
"nightly channel" -> "nightly release channel" please.
I think this is a little unclear because it implies that only language features are feature-gated, and "follow the same stabilization procedure as the standard library". But both language and library features are feature-gated. Feature-gating is the rust stabilization mechanism.
Some alternate ideas for text:
"Feature gates" are the mechanism Rust uses to stabilize features of the compiler, language, and standard library. A feature that is "gated" is accessible only on the nightly release channel, and then only when it has been explicitly enabled through
#[feature]
attributes or the-C unstable-options
command line argument. When a feature is stabilized it becomes available on the stable release channel, and does not need to be explicitly enabled. At that point the features is considered "ungated". Feature gates allow developers to test experimental features while they are under development, before they are available in the stable language.
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.
That text is better. Thanks!
cc @rust-lang/libs @rust-lang/lang new faqs that you may have opinions on. |
@@ -498,7 +540,7 @@ fn main() { | |||
What is the difference between passing by value, consuming, moving, and transferring ownership? | |||
</a></h3> | |||
|
|||
These are different terms for the same thing. In all cases, it means the value has been moved to another owner, and moved out of the possession of the original owner, who can no longer use it. | |||
These are different terms for the same thing. In all cases, it means the value has been moved to another owner, and moved out of the possession of the original owner, who can no longer use it. If a type implements the `Copy` trait, the value will be copied rather than moved, and so the original owner can continue to use the value. |
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.
"copied rather than moved" is potentially misleading since moves generally involve copying the memory (modulo optimizations).
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.
Yeah, probably better to just say that the original owner isn't invalidated.
Alright, I've gone through the latest round of feedback. Let me know if anything else needs fixing! |
Thanks @AndrewBrinker. |
I've added answers for a number of questions, including some mentioned in #248, #262, and #284. There are still some questions left to be answered, but I figure this is a good start.
r? @brson