-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Un-xfail test of error message for "missing 'self'" #2356
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
Comments
I made a pull request (#3252) which implements this feature. |
Fixed in 390a31a |
This doesn't work anymore, since the code that handled this for old-style classes doesn't work with |
Bumping to 0.7 |
Not critical for 0.7. Nominating for milestone 5, production-ready. |
just a bug, removing milestone/nomination. |
Visiting for triage, still an issue. |
visiting for triage, email from 2013 sep 23. |
This can probably be fixed as part of #2392 or v.v. |
…ichton Provides better help for the resolve failures inside an `impl` if the name matches: - a field on the self type - a method on the self type - a method on the current trait ref (in a trait impl) Not handling trait method suggestions if in a regular `impl` (as you can see on line 69 of the test), I believe it is possible though. Also, provides a better message when `self` fails to resolve due to being a static method. It's using some unsafe pointers to skip copying the larger structures (which are only used in error conditions); it's likely possible to get it working with lifetimes (all the useful refs should outlive the visitor calls) but I haven't really figured that out for this case. (can switch to copying code if wanted) Closes #2356.
require level and colon in `//~` style comments implements rust-lang/miri#2348 (comment)
The toolchain upgrade job is currently running every 4h, and it is generating a lot of unnecessary notifications when the job is broken. The nightly toolchain is updated once a day, so there's no point in running an update that often.
replace command that does not work
(Original title: More helpful error message for "missing 'self'")
The test for the improved error message was xfailed in SHA: 93d3b8a ; we want to un-xfail it.
Original bug report follows
Currently, if I write
x
inside a class that has fieldx
, andx
isn't in the outer scope, the error I get is "unresolved name". I could see that being confusing. Ideally the typechecker would suggest "did you meanself.x
?" ifself
has a field namedx
.The text was updated successfully, but these errors were encountered: