diff options
| author | David Wood <david@davidtw.co> | 2019-03-23 02:36:30 +0100 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2019-03-29 11:03:35 +0100 |
| commit | 49a6da2cda1a208838911e296fc72a6791e68406 (patch) | |
| tree | ddccdb032fd71f600e948b9082cf9734f6f473be /src/librustdoc/html/static | |
| parent | 18938416e4d34d7f7d64d11decd87ce47036bb75 (diff) | |
| download | rust-49a6da2cda1a208838911e296fc72a6791e68406.tar.gz rust-49a6da2cda1a208838911e296fc72a6791e68406.zip | |
Support non-exhaustive enum variants in rustdoc.
This commit adds support for non-exhaustive enum variants in rustdoc, extending the existing support for non-exhaustive enums and structs.
Diffstat (limited to 'src/librustdoc/html/static')
| -rw-r--r-- | src/librustdoc/html/static/main.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index fef6910f40a..85dc4d57337 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -2247,6 +2247,8 @@ if (!DOMTokenList.prototype.remove) { otherMessage += "struct"; } else if (hasClass(e, "non-exhaustive-enum")) { otherMessage += "enum"; + } else if (hasClass(e, "non-exhaustive-variant")) { + otherMessage += "enum variant"; } else if (hasClass(e, "non-exhaustive-type")) { otherMessage += "type"; } @@ -2264,6 +2266,9 @@ if (!DOMTokenList.prototype.remove) { if (hasClass(e, "type-decl") === true && showItemDeclarations === true) { collapseDocs(e.previousSibling.childNodes[0], "toggle"); } + if (hasClass(e, "non-exhaustive") === true) { + collapseDocs(e.previousSibling.childNodes[0], "toggle"); + } } } |
