mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
Remove unwrap in doc path resolution
This commit is contained in:
parent
fdd49b9713
commit
76e3feeeb5
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ fn resolve_doc_path(
|
|||
AttrDefId::MacroDefId(_) => return None,
|
||||
};
|
||||
let path = ast::Path::parse(link).ok()?;
|
||||
let modpath = ModPath::from_src(db.upcast(), path, &Hygiene::new_unhygienic()).unwrap();
|
||||
let modpath = ModPath::from_src(db.upcast(), path, &Hygiene::new_unhygienic())?;
|
||||
let resolved = resolver.resolve_module_path_in_items(db.upcast(), &modpath);
|
||||
let resolved = if resolved == PerNs::none() {
|
||||
resolver.resolve_module_path_in_trait_assoc_items(db.upcast(), &modpath)?
|
||||
|
|
Loading…
Reference in a new issue