diff options
| author | bors <bors@rust-lang.org> | 2023-09-02 04:53:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-02 04:53:19 +0000 |
| commit | 1fb6947abc68683db05f837f07531a2f7d7ed8b3 (patch) | |
| tree | 50f0b6db7c73c55c1708f2d6fe558fad9724592d /tests | |
| parent | 9dc11a13fa848c1b09b7248c540528190dcb79c5 (diff) | |
| parent | 159ad5fb0d5f6b8ba85eda2a9479a1a12727580d (diff) | |
| download | rust-1fb6947abc68683db05f837f07531a2f7d7ed8b3.tar.gz rust-1fb6947abc68683db05f837f07531a2f7d7ed8b3.zip | |
Auto merge of #115286 - saethlin:detangler, r=petrochenkov
Skip rendering metadata strings from include_str!/include_bytes! The const rendering code in rustdoc completely ignores consts from expansions, but the compiler was rendering all consts. So some consts (namely those from `include_bytes!`) were rendered then ignored. Most of the diff here is from moving `print_const_expr` from rustdoc into `rustc_hir_pretty` so that it can be used in rustdoc and when building rmeta files.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc/show-const-contents.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/rustdoc/show-const-contents.rs b/tests/rustdoc/show-const-contents.rs index 69e742ee747..91df03adbbc 100644 --- a/tests/rustdoc/show-const-contents.rs +++ b/tests/rustdoc/show-const-contents.rs @@ -47,7 +47,7 @@ pub struct MyTypeWithStr(&'static str); // @!hasraw show_const_contents/constant.MY_TYPE_WITH_STR.html '; //' pub const MY_TYPE_WITH_STR: MyTypeWithStr = MyTypeWithStr("show this"); -// @hasraw show_const_contents/constant.PI.html '= 3.14159265358979323846264338327950288f32;' +// @hasraw show_const_contents/constant.PI.html '= 3.14159265358979323846264338327950288_f32;' // @hasraw show_const_contents/constant.PI.html '; // 3.14159274f32' pub use std::f32::consts::PI; |
