diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-08-02 11:24:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-02 11:24:24 +0200 |
| commit | d082ff4c04c09e855d7ea55e0c9deda05eba46ec (patch) | |
| tree | c0b95c7bf6b389d2fa07dea65c5fe427c153de73 /compiler/rustc_mir_build/src/builder/expr | |
| parent | cafd9fb2d3f2b5179308f3c736341fa9cec61867 (diff) | |
| parent | 1e2d58798fab4aa6275acf3746e1aec5340fc97f (diff) | |
| download | rust-d082ff4c04c09e855d7ea55e0c9deda05eba46ec.tar.gz rust-d082ff4c04c09e855d7ea55e0c9deda05eba46ec.zip | |
Rollup merge of #144478 - joshtriplett:doc-code-formatting-prep, r=Amanieu
Improve formatting of doc code blocks We don't currently apply automatic formatting to doc comment code blocks. As a result, it has built up various idiosyncracies, which make such automatic formatting difficult. Some of those idiosyncracies also make things harder for human readers or other tools. This PR makes a few improvements to doc code formatting, in the hopes of making future automatic formatting easier, as well as in many cases providing net readability improvements. I would suggest reading each commit separately, as each commit contains one class of changes.
Diffstat (limited to 'compiler/rustc_mir_build/src/builder/expr')
| -rw-r--r-- | compiler/rustc_mir_build/src/builder/expr/as_operand.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/builder/expr/as_operand.rs b/compiler/rustc_mir_build/src/builder/expr/as_operand.rs index 982e7aa8246..6a422223990 100644 --- a/compiler/rustc_mir_build/src/builder/expr/as_operand.rs +++ b/compiler/rustc_mir_build/src/builder/expr/as_operand.rs @@ -57,7 +57,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { /// ``` /// #![feature(unsized_fn_params)] /// # use core::fmt::Debug; - /// fn foo(_p: dyn Debug) { /* ... */ } + /// fn foo(_p: dyn Debug) { + /// /* ... */ + /// } /// /// fn bar(box_p: Box<dyn Debug>) { foo(*box_p); } /// ``` |
