Some more fragment fixes

This commit is contained in:
Lukas Wirth 2021-07-20 17:03:39 +02:00
parent e8f1abf5f7
commit cb7b4a5d5b
5 changed files with 115 additions and 148 deletions

View file

@ -400,10 +400,7 @@ fn module_def_doctest(db: &RootDatabase, def: hir::ModuleDef) -> Option<Runnable
let def_name = def.name(db)?;
let path = (|| {
let mut path = String::new();
def.module(db)?
.path_to_root(db)
.into_iter()
.rev()
def.canonical_module_path(db)?
.flat_map(|it| it.name(db))
.for_each(|name| format_to!(path, "{}::", name));
// This probably belongs to canonical_path?