#compdef rustdoc

# zsh completions for 'rustdoc'
local arguments

arguments=(
  {-h,--help}'[show this help message]'
  {-V,--version}'[print rustdocs version]'
  {-v,--verbose}'[use verbose output]'
  {-r,--input-format}'[the input type of the specified file]'
  {-w,--output-format}'[the output type to write]'
  {-o,--output}'[where to place the output]'
  '--crate-name[specify the name of this crate]'
  '--crate-type[comma separated list of types of crates]'
  {-L,--library-path}'[directory to add to crate search path]'
  '--cfg[pass a --cfg to rustc]'
  '--extern[PATH\]]'
  '--extern-html-root-url[URL]'
  '--plugin-path[removed]'
  {-C,--codegen}'[VALUE\]]'
  '--passes[list of passes to also run, you might want to pass it]'
  '--plugins[removed]'
  '--no-defaults[dont run the default passes]'
  '--document-private-items[document private items]'
  '--document-hidden-items[document items that have doc(hidden)]'
  '--test[run code examples as tests]'
  '--test-args[arguments to pass to the test runner]'
  '--test-run-directory[the working directory in which to run tests]'
  '--target[target triple to document]'
  '--markdown-css[CSS files to include via <link> in a rendered Markdown]'
  '--html-in-header[files to include inline in the <head> section of a]'
  '--html-before-content[files to include inline between <body> and the content]'
  '--html-after-content[files to include inline between the content and]'
  '--markdown-before-content[files to include inline between <body> and the content]'
  '--markdown-after-content[files to include inline between the content and]'
  '--markdown-playground-url[URL to send code snippets to]'
  '--markdown-no-toc[dont include table of contents]'
  {-e,--extend-css}'[to add some CSS rules with a given file to generate]'
  '-Z[internal and debugging options (only on nightly build)]'
  '--sysroot[override the system root]'
  '--playground-url[URL to send code snippets to, may be reset by]'
  '--markdown-playground-url[`#!\[doc(html_playground_url=...)\]`]'
  '--display-warnings[to print code warnings when testing doc]'
  '--crate-version[crate version to print into documentation]'
  '--sort-modules-by-appearance[sort modules by where they appear in the program]'
  '--default-theme[set the default theme. THEME should be the theme name]'
  '--default-setting[VALUE\]]'
  '--theme[additional themes which will be added to the generated]'
  '--check-theme[check if given theme is valid]'
  '--resource-suffix[suffix to add to CSS and JavaScript files, e.g.]'
  '--edition[edition to use when compiling rust code (default:]'
  '--color[configure coloring of output:]'
  '--error-format[how errors and other messages are produced]'
  '--json[configure the structure of JSON diagnostics]'
  '--disable-minification[disable minification applied on JS files]'
  {-W,--warn}'[set lint warnings]'
  {-A,--allow}'[set lint allowed]'
  {-D,--deny}'[set lint denied]'
  {-F,--forbid}'[set lint forbidden]'
  '--cap-lints[set the most restrictive lint level. More restrictive]'
  '--index-page[markdown file to be used as index page]'
  '--enable-index-page[to enable generation of the index page]'
  '--static-root-path[path string to force loading static files from in]'
  '--disable-per-crate-search[disables generating the crate selector on the search]'
  '--persist-doctests[directory to persist doctest executables into]'
  '--show-coverage[calculate percentage of public items with]'
  '--enable-per-target-ignores[parse ignore-foo for ignoring doctests on a per-target]'
  '--runtool[tool to run tests with when building for a different target than host]'
  '--runtool-arg[(of possibly many) arguments to pass to the runtool]'
  '--test-builder[the rustc-like binary to use as the test builder]'
  '--check[run rustdoc checks]'
  '--generate-redirect-map[generate JSON file at the top level instead of]'
  '--print[rustdoc information to print on stdout]'
  '--emit[toolchain-shared-resources,invocation-specific\]]'
  '*:filename:_files'
)

_arguments -s $arguments
