Skip to content
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

Merged
merged 1 commit into from
Jan 22, 2015

Conversation

steveklabnik
Copy link
Member

No description provided.

@rust-highfive
Copy link
Collaborator

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -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 \
Copy link
Member

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.

Copy link
Member Author

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...

Copy link
Member

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.

@steveklabnik
Copy link
Member Author

@alexcrichton updated to remove the &*foo

@alexcrichton
Copy link
Member

@bors: r+ 29e5d8d rollup

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 21, 2015
@bors bors merged commit 29e5d8d into rust-lang:master Jan 22, 2015
@steveklabnik steveklabnik deleted the deprecation branch October 25, 2017 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants