diff options
| author | John-John Tedro <udoprog@tedro.se> | 2021-11-18 05:19:58 +0100 |
|---|---|---|
| committer | John-John Tedro <udoprog@tedro.se> | 2021-11-18 05:20:53 +0100 |
| commit | 76e3feeeb558669620be741ea5985d60d62318ff (patch) | |
| tree | 0ef7ad017a1e6ea3d699551bb8223d25420793e3 | |
| parent | fdd49b97133a77ff652017d24b72ced37d4a822d (diff) | |
Remove unwrap in doc path resolution
| -rw-r--r-- | crates/hir/src/attrs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir/src/attrs.rs b/crates/hir/src/attrs.rs index c7a8463a3c4..2f6eed82cb6 100644 --- a/crates/hir/src/attrs.rs +++ b/crates/hir/src/attrs.rs @@ -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)? |
