-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Redesign the libsyntax and librustc APIs to make them more amenable to tooling #9769
Comments
Nominating for Production Ready milestone. |
Heh, that was me that asked Graydon about DXR :-) DXR support is coming along nicely, but we hack an extra phase into the compiler rather than using a nice API. Hopefully we can do better in the long run... |
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#643 |
Add new lint [`misnamed-getters`] ``` changelog: Add new lint [`misnamed-getters`] ``` Closes rust-lang#9769 The current lint matches all methods with a body of just one expression under the form `(&mut?)? <expr>.field` where field doesn't match the name of the method but there is a field of the same type in `<expr>` that matches the name. This allows matching nested structs, for example for newtype wrappers. This may cast the net a bit too wide and cause false positives. I'll run [clippy_lint_tester](https://github.com/mikerite/clippy_lint_tester) on the top crates to see how frequently false positives happen. There also may be room for improvement by checking that the replacement field would work taking into account implementations of `Deref` and `DerefMut` even if the types don't exactly match but I don't know yet how this could be done.
http://www.reddit.com/r/programming/comments/1nxs2i/the_state_of_rust_08/ccn50ti
There's long been sentiment that the APIs provided by libsyntax and librustc are kinda okay for tooling, but not great.
For another anecdote, this past weekend at MozSummit someone asked whether it would be possible to add Rust support to DXR (http://dxr.mozilla.org/), to which Graydon replied that it would be difficult (relative to clang, at least).
This is obviously sort of a nebulous "figure out the API" bug, but it's important enough that we'll have to start thinking about it sometime. Without a good tooling story, we won't be able to compete with C++.
The text was updated successfully, but these errors were encountered: