-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Move unused-attribute pass after trans #14406
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
Comments
@sfackler this would require keeping the AST and all analysis data through trans, right? |
That or performing the check as trans consumes the AST. |
Looks like this could cause issues with |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jun 5, 2023
…, r=Veykril Add doc-alias based completion Closes rust-lang#14406. I adapted the parsing code from the CfgExpr parsing code, maybe there's a better abstraction for both, or attribute parsing in general. It also includes `doc(hidden)`-parsing, which means it could replace the other function. There are a few tests for parsing. `process_all_names` changed the most, I added some docs there to explain what happens. Many call sites just pass an empy vec to `add_path_resolution`'s `doc_aliases`, since either it doesn't make sense to pass anything (e.g. visibility completion) or I don't know where to get them from. Shouldn't really matter, as it will just not show aliases if the vec is empty and we can extend alias completion in these cases later. I added two tests in `special.rs` for struct name completion (which was the main thing I wanted). I also tried function and field names, but these don't work yet. I want to add those in a follow-up PR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Many attributes are not used until after trans, but the current lint pass runs before it. Those attributes are currently globally whitelisted, but this isn't a great long term solution.
The text was updated successfully, but these errors were encountered: