-
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
Deprecate UnsafeCell::value #25867
Deprecate UnsafeCell::value #25867
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
Nice! Could this actually take the route of |
Done. |
@@ -641,6 +641,8 @@ pub struct UnsafeCell<T: ?Sized> { | |||
/// | |||
/// This field should not be accessed directly, it is made public for static | |||
/// initializers. | |||
#[deprecated(since = "1.2.0", reason = "use `get` to access the wrapped value or `new` to |
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.
I think this message may be a bit off-kilter due to the newline, could this use \
at the end of the string to make sure it's parsed as one line?
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.
Also, could you be sure to wrap this line to 80 characters? (the surrounding style)
Now when const functions are implemented and used, the `value` field of `UnsafeCell` can be made deprecated (and then private as intended).
Now when const functions are implemented and used, the
value
field ofUnsafeCell
can be made deprecated (and then private as intended).