-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Improve quality of String#to_slice() deprecation message #21157
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
bc1a3bc
to
bd24297
Compare
@@ -1150,7 +1150,7 @@ mod traits { | |||
|
|||
/// Any string that can be represented as a slice | |||
#[unstable = "Instead of taking this bound generically, this trait will be \ | |||
replaced with one of slicing syntax, deref coercions, or \ | |||
replaced with one of slicing syntax (&foo[]), deref coercions (&*foo), or \ |
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.
This deref coercions is actually referring to this RFC rather than existing syntax. It may be worth calling it out a little more perhaps.
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.
Hmm yeah. At the same time, don't want to make it too verbose...
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.
Perhaps this could avoid using (&*foo)
explicitly? Eventually it'll in theory just be &foo
to coerce to &str
from &String
.
bd24297
to
29e5d8d
Compare
@alexcrichton updated to remove the |
No description provided.