Improve hover module path rendering

This commit is contained in:
Lukas Wirth 2025-01-10 11:53:58 +01:00
parent 1b52a6680f
commit 3bae1f0a1b
5 changed files with 133 additions and 23 deletions

View file

@ -92,11 +92,11 @@ impl Definition {
Definition::ExternCrateDecl(it) => it.module(db),
Definition::DeriveHelper(it) => it.derive().module(db),
Definition::InlineAsmOperand(it) => it.parent(db).module(db),
Definition::ToolModule(t) => t.krate().root_module(),
Definition::BuiltinAttr(_)
| Definition::BuiltinType(_)
| Definition::BuiltinLifetime(_)
| Definition::TupleField(_)
| Definition::ToolModule(_)
| Definition::InlineAsmRegOrRegClass(_) => return None,
};
Some(module)