diff options
| author | Dan Gohman <dev@sunfishcode.online> | 2021-02-26 07:33:28 -0800 |
|---|---|---|
| committer | Dan Gohman <dev@sunfishcode.online> | 2021-02-27 07:33:28 -0800 |
| commit | b89e828c0427f40b2c093c1dc80ee1184a8fd46f (patch) | |
| tree | 8d8e13d790c14ea78556ec7fcc75ebadc710e1ec | |
| parent | 8e863eb59a10fb0900d7377524a0dc7bf44b9ae3 (diff) | |
| download | rust-b89e828c0427f40b2c093c1dc80ee1184a8fd46f.tar.gz rust-b89e828c0427f40b2c093c1dc80ee1184a8fd46f.zip | |
Teach rustdoc how to display WASI.
As a followup to [this comment] in #82420, this patch teaches rustdoc how to display WASI. [this comment]: https://github.com/rust-lang/rust/pull/82420#issuecomment-784523826
| -rw-r--r-- | src/librustdoc/clean/cfg.rs | 1 | ||||
| -rw-r--r-- | src/librustdoc/clean/cfg/tests.rs | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/librustdoc/clean/cfg.rs b/src/librustdoc/clean/cfg.rs index 444b73246da..2e2af703bcf 100644 --- a/src/librustdoc/clean/cfg.rs +++ b/src/librustdoc/clean/cfg.rs @@ -483,6 +483,7 @@ impl<'a> fmt::Display for Display<'a> { "openbsd" => "OpenBSD", "redox" => "Redox", "solaris" => "Solaris", + "wasi" => "WASI", "windows" => "Windows", _ => "", }, diff --git a/src/librustdoc/clean/cfg/tests.rs b/src/librustdoc/clean/cfg/tests.rs index 3a78269f19a..34b9cbcb679 100644 --- a/src/librustdoc/clean/cfg/tests.rs +++ b/src/librustdoc/clean/cfg/tests.rs @@ -368,6 +368,10 @@ fn test_render_long_html() { "This is supported on <strong>macOS</strong> only." ); assert_eq!( + name_value_cfg("target_os", "wasi").render_long_html(), + "This is supported on <strong>WASI</strong> only." + ); + assert_eq!( name_value_cfg("target_pointer_width", "16").render_long_html(), "This is supported on <strong>16-bit</strong> only." ); |
