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

use structured suggestions for nonexistent fields #57047

Merged
merged 1 commit into from
Dec 31, 2018

Conversation

euclio
Copy link
Contributor

@euclio euclio commented Dec 21, 2018

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2018
@euclio euclio force-pushed the field-structured-suggestions branch from c48ddf7 to f81aa03 Compare December 21, 2018 19:38
@bors
Copy link
Contributor

bors commented Dec 26, 2018

☔ The latest upstream changes (presumably #57108) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to rebase to fix the merge conflict.

Left one wording nitpick, as we're trying to move away from the "did you mean" style.

src/librustc_typeck/check/mod.rs Outdated Show resolved Hide resolved
@estebank estebank added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 27, 2018
@euclio euclio force-pushed the field-structured-suggestions branch from f81aa03 to dfc326d Compare December 31, 2018 17:53
@euclio
Copy link
Contributor Author

euclio commented Dec 31, 2018

@estebank Rebased, and removed the "did you mean" language from the affected diagnostics.

@@ -2,7 +2,7 @@ error[E0560]: struct `NonCopyable` has no field named `p`
--> $DIR/issue-4736.rs:4:26
|
LL | let z = NonCopyable{ p: () }; //~ ERROR struct `NonCopyable` has no field named `p`
| ^ field does not exist - did you mean `0`?
| ^ help: a field with a similar name exists: `0`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not relevant to this PR It'd be nice to suggest the appropriate syntax here:


error[E0560]: struct `NonCopyable` has no field named `p`
  --> $DIR/issue-4736.rs:4:26
   |
LL |     let z = NonCopyable{ p: () }; //~ ERROR struct `NonCopyable` has no field named `p`
   |             -------------^-----
   |             |            |
   |             |            field does not exist
   |             help: `NonCopyable` is a tuple struct, use the appropriate syntax: `NonCopyable(())`

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Dec 31, 2018

📌 Commit dfc326d has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 31, 2018
@bors
Copy link
Contributor

bors commented Dec 31, 2018

⌛ Testing commit dfc326d with merge 9eac386...

bors added a commit that referenced this pull request Dec 31, 2018
use structured suggestions for nonexistent fields

r? @estebank
@bors
Copy link
Contributor

bors commented Dec 31, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: estebank
Pushing 9eac386 to master...

@bors bors merged commit dfc326d into rust-lang:master Dec 31, 2018
@euclio euclio deleted the field-structured-suggestions branch January 1, 2019 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants