# assistant: Allow \`/rustdoc\` to use local docs \(\#12613\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/14c2fab8abed4c866e1c14faaeb8311cfbd7d4f0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 14c2fab8abed4c866e1c14faaeb8311cfbd7d4f0

Requested commit: 14c2fab8abed4c866e1c14faaeb8311cfbd7d4f0

Commit: 14c2fab8abed4c866e1c14faaeb8311cfbd7d4f0

Tree: c675a56c295fa5c987da602232a1dd4239e52c2a

Author: Marshall Bowers

Committer: GitHub

## Message

```
assistant: Allow `/rustdoc` to use local docs (#12613)

This PR updates the `/rustdoc` slash command to use local docs built
with `cargo doc`.

If the docs for a particular crate/module are available locally, those
will be used. Otherwise, it will fall back to retrieving the docs from
`docs.rs`.

The placeholder output for the slash command will indicate which source
was used for the docs:

<img width="289" alt="Screenshot 2024-06-03 at 4 13 42 PM"
src="https://github.com/zed-industries/zed/assets/1486634/729112e4-80ca-4f08-bdb3-88fc950351c3">

Release Notes:

- N/A
```

## Parents

- [c752763301681a1ae3eefe3c65c2c43584365321](https://git.cafe/gitcafe/zed/commit/c752763301681a1ae3eefe3c65c2c43584365321?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/14c2fab8abed4c866e1c14faaeb8311cfbd7d4f0?format=markdown)
