Skip to content

Commit 9521219

Browse files
committed
move misplaced comment
1 parent 19e1f73 commit 9521219

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_macros/src/diagnostics/diagnostic.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ impl<'a> SessionDiagnosticDerive<'a> {
110110
)
111111
});
112112

113-
// When generating `set_arg` or `add_subdiagnostic` calls, move data rather than
114-
// borrow it to avoid requiring clones - this must therefore be the last use of
115-
// each field (for example, any formatting machinery that might refer to a field
116-
// should be generated already).
117113
structure.bind_with(|_| synstructure::BindStyle::Move);
118114
// When a field has attributes like `#[label]` or `#[note]` then it doesn't
119115
// need to be passed as an argument to the diagnostic. But when a field has no
@@ -373,6 +369,10 @@ impl SessionDiagnosticDeriveBuilder {
373369

374370
let inner_ty = FieldInnerTy::from_type(&info.ty);
375371

372+
// When generating `set_arg` or `add_subdiagnostic` calls, move data rather than
373+
// borrow it to avoid requiring clones - this must therefore be the last use of
374+
// each field (for example, any formatting machinery that might refer to a field
375+
// should be generated already).
376376
if attrs.is_empty() {
377377
let diag = &self.diag;
378378
let ident = info.binding.ast().ident.as_ref().unwrap();

0 commit comments

Comments
 (0)