Skip to content

Commit b89e828

Browse files
committed
Teach rustdoc how to display WASI.
As a followup to [this comment] in #82420, this patch teaches rustdoc how to display WASI. [this comment]: #82420 (comment)
1 parent 8e863eb commit b89e828

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/librustdoc/clean/cfg.rs

+1
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ impl<'a> fmt::Display for Display<'a> {
483483
"openbsd" => "OpenBSD",
484484
"redox" => "Redox",
485485
"solaris" => "Solaris",
486+
"wasi" => "WASI",
486487
"windows" => "Windows",
487488
_ => "",
488489
},

src/librustdoc/clean/cfg/tests.rs

+4
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ fn test_render_long_html() {
367367
name_value_cfg("target_os", "macos").render_long_html(),
368368
"This is supported on <strong>macOS</strong> only."
369369
);
370+
assert_eq!(
371+
name_value_cfg("target_os", "wasi").render_long_html(),
372+
"This is supported on <strong>WASI</strong> only."
373+
);
370374
assert_eq!(
371375
name_value_cfg("target_pointer_width", "16").render_long_html(),
372376
"This is supported on <strong>16-bit</strong> only."

0 commit comments

Comments
 (0)