-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
diagnostics: can we suggest &* here? #53879
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
pub fn version<S: Into<&'b str>>(self, ver: S) -> Self Looks like you can just do |
Indeed, but in my original code I had a function to generate the version which returned a |
A similar issue was opened last week on clap's repository clap-rs/clap#1336 |
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 27, 2019
…avus Add suggestion to use `&*var` when `&str: From<String>` is expected Fix rust-lang#53879.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 27, 2019
…avus Add suggestion to use `&*var` when `&str: From<String>` is expected Fix rust-lang#53879.
cuviper
added a commit
to cuviper/rust
that referenced
this issue
Mar 28, 2019
…avus Add suggestion to use `&*var` when `&str: From<String>` is expected Fix rust-lang#53879.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I spent {way too much} time on this yesterday:
this code fails to build with
passing
v
by reference doesn't help either (.version(&v)
, the msg is almost identical then).What fixed this for me in the end was
.version(&*v)
.Is there a way we could suggest to the user to use
&*
in this example?the
version
method signature can be found hereThe text was updated successfully, but these errors were encountered: