-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
conversion method suggestion is wrong given struct field init shorthand #52820
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
zackmdavis
added
the
A-diagnostics
Area: Messages for errors, warnings, and lints
label
Sep 12, 2018
Centril
added a commit
to Centril/rust
that referenced
this issue
May 29, 2019
Account for short-hand init structs when suggesting conversion Fix rust-lang#52820.
Centril
added a commit
to Centril/rust
that referenced
this issue
May 29, 2019
Account for short-hand init structs when suggesting conversion Fix rust-lang#52820.
Centril
added a commit
to Centril/rust
that referenced
this issue
May 29, 2019
Account for short-hand init structs when suggesting conversion Fix rust-lang#52820.
Centril
added a commit
to Centril/rust
that referenced
this issue
May 29, 2019
Account for short-hand init structs when suggesting conversion Fix rust-lang#52820.
Centril
added a commit
to Centril/rust
that referenced
this issue
May 29, 2019
Account for short-hand init structs when suggesting conversion Fix rust-lang#52820.
oli-obk
added a commit
to oli-obk/rust
that referenced
this issue
May 29, 2019
Account for short-hand init structs when suggesting conversion Fix rust-lang#52820.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider this program:
Currently (as of nightly 23 July), we suggest just tacking on a
.to_string()
, which isn't going to work.The conversion method suggestion was added in #46461. I fear it may be messier to remediate this than one might hope because
demand_coerce
takes ahir::Expr
and would probably need another argument to know about the shorthand-ness, which lives onhir::FieldPat
.The text was updated successfully, but these errors were encountered: