diff --git a/src/librustdoc/clean/cfg.rs b/src/librustdoc/clean/cfg.rs index 444b73246da4..2e2af703bcf1 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 3a78269f19af..34b9cbcb6793 100644 --- a/src/librustdoc/clean/cfg/tests.rs +++ b/src/librustdoc/clean/cfg/tests.rs @@ -367,6 +367,10 @@ fn test_render_long_html() { name_value_cfg("target_os", "macos").render_long_html(), "This is supported on macOS only." ); + assert_eq!( + name_value_cfg("target_os", "wasi").render_long_html(), + "This is supported on WASI only." + ); assert_eq!( name_value_cfg("target_pointer_width", "16").render_long_html(), "This is supported on 16-bit only."