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

Projects
None yet
5 participants
@euclio
Copy link
Contributor

euclio commented Dec 21, 2018

@euclio euclio force-pushed the euclio:field-structured-suggestions branch from c48ddf7 to f81aa03 Dec 21, 2018

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 26, 2018

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

@estebank
Copy link
Contributor

estebank left a comment

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.

Show resolved Hide resolved src/librustc_typeck/check/mod.rs Outdated

@euclio euclio force-pushed the euclio:field-structured-suggestions branch from f81aa03 to dfc326d Dec 31, 2018

@euclio

This comment has been minimized.

Copy link
Contributor

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`

This comment has been minimized.

@estebank

estebank Dec 31, 2018

Contributor

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

This comment has been minimized.

Copy link
Contributor

estebank commented Dec 31, 2018

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 31, 2018

📌 Commit dfc326d has been approved by estebank

@bors

This comment has been minimized.

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

Auto merge of #57047 - euclio:field-structured-suggestions, r=estebank
use structured suggestions for nonexistent fields

r? @estebank
@bors

This comment has been minimized.

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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@euclio euclio deleted the euclio:field-structured-suggestions branch Jan 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment