mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
Merge #9464
9464: fix: Fix runnables using wrong file ids for module doctests r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
dd69d4a97c
@ -360,7 +360,10 @@ fn module_def_doctest(sema: &Semantics<RootDatabase>, def: hir::ModuleDef) -> Op
|
||||
.map(TestId::Path)
|
||||
.or_else(|| def_name.clone().map(TestId::Name))?;
|
||||
|
||||
let mut nav = def.try_to_nav(sema.db)?;
|
||||
let mut nav = match def {
|
||||
hir::ModuleDef::Module(def) => NavigationTarget::from_module_to_decl(sema.db, def),
|
||||
def => def.try_to_nav(sema.db)?,
|
||||
};
|
||||
nav.focus_range = None;
|
||||
nav.description = None;
|
||||
nav.docs = None;
|
||||
|
Loading…
Reference in New Issue
Block a user