-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 #19267
Conversation
} | ||
|
||
fcx.write_error(expr.id); | ||
} | ||
|
||
fn suggest_field_names<'tcx>(t : ty::t, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our style is to not add any whitespace for alignment.
Could you add some tests for this? Just a few cases in compile-fail that the messages get emitted. |
d179dc0
to
5d1b223
Compare
@oli-obk have you made all your changes? (github doesn't notify us when you just add commits, you need to ping someone when you're ready). Regardless, needs a rebase. |
not yet, as i need to rewrite some of the error reporting code, to prevent hinting field names of fields that are actually set |
closing for inactivity. @oli-obk let us know when you get back to this. It needs rebase so probably a new PR would be just fine. |
…excrichton rebase and fix of #19267
now shows
same help message for accessing fields.
can't do it for functions, as they aren't iteratable. Only exact lookups are possible there.