File tree 1 file changed +4
-9
lines changed
compiler/rustc_middle/src 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(
286
286
///
287
287
/// ## `decorate` signature
288
288
///
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, ()>`?
296
291
///
297
- /// There 2 reasons for such choice signature.
292
+ /// There are 2 reasons for this signature.
298
293
///
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
300
295
/// builder will be later used and shouldn't be emitted right away (this is
301
296
/// especially important because the old API expected you to call `.emit()` in
302
297
/// the closure).
You can’t perform that action at this time.
0 commit comments