Skip to content

Commit 2af6677

Browse files
authored
Rollup merge of #91518 - luojia65:rustdoc-riscv-arch, r=GuillaumeGomez
Add readable rustdoc display for RISC-V target This pull request adds a human readable rustdoc display for RISC-V architecture. Target configuration marked as `#[cfg(target_arch = "riscv32")]` or `#[cfg(target_arch = "riscv64")]` are pretty formatted like `RISC-V RV32` and `RISC-V RV64` in Rust docs. Before: ![图片](https://user-images.githubusercontent.com/40385009/152681944-58d758ae-ac4f-412b-b70c-1e673a2a071e.png) After: ![图片](https://user-images.githubusercontent.com/40385009/152681923-91d5fe75-c3b2-4ac2-865c-54eac0aefe8d.png)
2 parents f296b9a + 39d99a1 commit 2af6677

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustdoc/clean/cfg.rs

+2
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@ impl<'a> fmt::Display for Display<'a> {
517517
"msp430" => "MSP430",
518518
"powerpc" => "PowerPC",
519519
"powerpc64" => "PowerPC-64",
520+
"riscv32" => "RISC-V RV32",
521+
"riscv64" => "RISC-V RV64",
520522
"s390x" => "s390x",
521523
"sparc64" => "SPARC64",
522524
"wasm32" | "wasm64" => "WebAssembly",

0 commit comments

Comments
 (0)