mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
internal: Enforce Resolver to always have a module scope
This commit is contained in:
parent
ef92453dfe
commit
75689f2ad8
71 changed files with 360 additions and 398 deletions
|
@ -170,7 +170,7 @@ pub(crate) fn hover_for_definition(
|
|||
config: &HoverConfig,
|
||||
) -> Option<HoverResult> {
|
||||
let famous_defs = match &definition {
|
||||
Definition::BuiltinType(_) => Some(FamousDefs(sema, sema.scope(node).krate())),
|
||||
Definition::BuiltinType(_) => Some(FamousDefs(sema, sema.scope(node)?.krate())),
|
||||
_ => None,
|
||||
};
|
||||
if let Some(markup) = render::definition(sema.db, definition, famous_defs.as_ref(), config) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue