This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
compiler/rustc_middle/src Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -286,17 +286,12 @@ pub fn explain_lint_level_source(
286286///
287287/// ## `decorate` signature
288288///
289- /// Signature of `decorate` may be confusing at first, for instance what's the
290- /// point of returning `&'b mut DiagnosticBuilder<'a, ()>` if the original can
291- /// be used instead?
292- /// ```ignore pseudo-code
293- /// _ = decorate(&mut diag);
294- /// /* use `diag` here again */
295- /// ```
289+ /// The return value of `decorate` is ignored by this function. So what is the
290+ /// point of returning `&'b mut DiagnosticBuilder<'a, ()>`?
296291///
297- /// There 2 reasons for such choice signature.
292+ /// There are 2 reasons for this signature.
298293///
299- /// First off all, it prevents accidental use `.emit()` -- it's clear that the
294+ /// First off all, it prevents accidental use of `.emit()` -- it's clear that the
300295/// builder will be later used and shouldn't be emitted right away (this is
301296/// especially important because the old API expected you to call `.emit()` in
302297/// the closure).
You can’t perform that action at this time.
0 commit comments