Skip to content

Commit

Permalink
Rollup merge of rust-lang#85657 - kpreid:brackets, r=jyn514
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GuillaumeGomez authored May 25, 2021
2 parents aa8c37d + 08e7c6b commit afec726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ fn document_non_exhaustive(w: &mut Buffer, item: &clean::Item) {
w.write_str(
"Non-exhaustive structs could have additional fields added in future. \
Therefore, non-exhaustive structs cannot be constructed in external crates \
using the traditional <code>Struct {{ .. }}</code> syntax; cannot be \
using the traditional <code>Struct { .. }</code> syntax; cannot be \
matched against without a wildcard <code>..</code>; and \
struct update syntax will not work.",
);
Expand Down

0 comments on commit afec726

Please sign in to comment.