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

librustc: hint close matches on accessing nonexisting fields #21187

Merged
merged 1 commit into from
Jan 22, 2015

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 15, 2015

rebase and fix of #19267

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

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

@oli-obk oli-obk force-pushed the feature/hint_struct_field_access branch 2 times, most recently from 59241c8 to 9cd90f7 Compare January 15, 2015 12:01
@@ -3572,11 +3573,44 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
actual)
},
expr_t, None);
if let Some(t) = ty::ty_to_def_id(expr_t) {
suggest_field_names(t, field, tcx, vec![]);
}
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test for this error message as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, allthough the test is not (yet) useful since it's ignored: #21195

@oli-obk oli-obk force-pushed the feature/hint_struct_field_access branch 3 times, most recently from 9f085cc to c8d68a7 Compare January 19, 2015 12:51
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 19, 2015

rebased on master, added test and changed number of help messages to one. local make check-stage1 passes, make check is running right now

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 19, 2015

make check passed

@alexcrichton
Copy link
Member

Thanks! Could you squash the commits together as well?

@oli-obk oli-obk force-pushed the feature/hint_struct_field_access branch from c8d68a7 to b24da87 Compare January 19, 2015 20:42
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 19, 2015

i just left them there for easier reading.
squashed and rebased

@alexcrichton
Copy link
Member

@bors: r+ b24da87

@bors
Copy link
Contributor

bors commented Jan 20, 2015

⌛ Testing commit b24da87 with merge b63cc5c...

@bors
Copy link
Contributor

bors commented Jan 20, 2015

💔 Test failed - auto-mac-64-opt

@oli-obk oli-obk force-pushed the feature/hint_struct_field_access branch from b24da87 to 09d9924 Compare January 20, 2015 09:59
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 20, 2015

sorry about that. fixed, rebased and make check ran through

@alexcrichton
Copy link
Member

@bors: r+ 09d9924

bors added a commit that referenced this pull request Jan 22, 2015
@bors
Copy link
Contributor

bors commented Jan 22, 2015

⌛ Testing commit 09d9924 with merge b7930d9...

@bors bors merged commit 09d9924 into rust-lang:master Jan 22, 2015
@oli-obk oli-obk deleted the feature/hint_struct_field_access branch January 23, 2015 09:25
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.

4 participants