-
Notifications
You must be signed in to change notification settings - Fork 13.3k
collect doc alias as tips during resolution #127721
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
base: master
Are you sure you want to change the base?
Conversation
In general I'd prefer to maybe not do this at all for the local crate. |
Agree and accept this suggestion. @rustbot ready |
This comment was marked as resolved.
This comment was marked as resolved.
@bvanjoi triage here, any interest in rebasing this? |
@bvanjoi |
Rebased. @rustbot ready |
This comment was marked as resolved.
This comment was marked as resolved.
Update: Fixes the incorrect submodule... |
This comment was marked as resolved.
This comment was marked as resolved.
Hi @estebank could you take a look at this when you get a chance? Thanks 🙂 |
Maybe r? @petrochenkov (or reroll)? |
Some changes occurred in compiler/rustc_attr_parsing |
@rustbot ready |
let mod_seg = path[path.len() - 2]; | ||
if let Some(seg_id) = mod_seg.id | ||
&& let Some(res) = self.r.partial_res_map.get(&seg_id) | ||
&& let hir::def::Res::Def(hir::def::DefKind::Mod, module) = res.base_res() |
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.
&& let hir::def::Res::Def(hir::def::DefKind::Mod, module) = res.base_res() | |
&& let Res::Def(DefKind::Mod, module) = res.expect_full_res() |
} | ||
} | ||
} else { | ||
let mod_seg = path[path.len() - 2]; |
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.
The unresolved segment is not necessarily last, index of the unresolved segment can be obtained using partial_res.unresolved_segments()
in smart_resolve_path_fragment
(or it's 0 if there is no partial resolution).
Close #124273
Collect the symbol in the doc alias attributes and provide a tip when a match is found.
r? @estebank