Skip to content

Commit afec726

Browse files
Rollup merge of #85657 - kpreid:brackets, r=jyn514
Remove doubled braces in non_exhaustive structs’ documentation text. In commit 4b80687 (part of Rust 1.52.1) many calls to `write!(w,` were replaced with `w.write_str(`, but this one contained braces that were doubled to escape them when taken as a format string, and so changing the call without changing the text caused them to become doubled in the final HTML output. I examined `print_item.rs` and the diff of that prior commit for any other occurrences of this mistake and I did not find any.
2 parents aa8c37d + 08e7c6b commit afec726

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/render/print_item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ fn document_non_exhaustive(w: &mut Buffer, item: &clean::Item) {
15021502
w.write_str(
15031503
"Non-exhaustive structs could have additional fields added in future. \
15041504
Therefore, non-exhaustive structs cannot be constructed in external crates \
1505-
using the traditional <code>Struct {{ .. }}</code> syntax; cannot be \
1505+
using the traditional <code>Struct { .. }</code> syntax; cannot be \
15061506
matched against without a wildcard <code>..</code>; and \
15071507
struct update syntax will not work.",
15081508
);

0 commit comments

Comments
 (0)