diff --git a/crates/assistant/src/slash_command/rustdoc_command.rs b/crates/assistant/src/slash_command/rustdoc_command.rs index 4eabc2821e..ecb6cee660 100644 --- a/crates/assistant/src/slash_command/rustdoc_command.rs +++ b/crates/assistant/src/slash_command/rustdoc_command.rs @@ -180,7 +180,14 @@ impl SlashCommand for RustdocSlashCommand { let item_path = item_path.clone(); async move { let item_docs = rustdoc_store - .load(crate_name.clone(), Some(item_path.join("::"))) + .load( + crate_name.clone(), + if item_path.is_empty() { + None + } else { + Some(item_path.join("::")) + }, + ) .await; if let Ok(item_docs) = item_docs {