-
Couldn't load subscription status.
- Fork 13.9k
Detect missing derive on unresolved attribute even when not imported
#142487
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -210,6 +210,17 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { | |
| } | ||
| } | ||
|
|
||
| /// Add every proc macro accessible from the current crate to the `macro_map` so diagnostics can | ||
| /// find them for suggestions. | ||
| pub(crate) fn register_macros_for_all_crates(&mut self) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code this is replacing would register any non-proc-macro derives or attributes, if any; this seems to only register proc macros. With the addition of |
||
| if !self.all_crate_macros_already_registered { | ||
| for def_id in self.cstore().all_proc_macro_def_ids() { | ||
| self.get_macro_by_def_id(def_id); | ||
| } | ||
| self.all_crate_macros_already_registered = true; | ||
| } | ||
| } | ||
|
|
||
| pub(crate) fn build_reduced_graph( | ||
| &mut self, | ||
| fragment: &AstFragment, | ||
|
|
||
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.
That said, in gen blocks you can use just
fors andifs with zero closures and iterator adapters.