File tree 1 file changed +4
-4
lines changed
compiler/rustc_macros/src/diagnostics 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,6 @@ impl<'a> SessionDiagnosticDerive<'a> {
110
110
)
111
111
} ) ;
112
112
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).
117
113
structure. bind_with ( |_| synstructure:: BindStyle :: Move ) ;
118
114
// When a field has attributes like `#[label]` or `#[note]` then it doesn't
119
115
// need to be passed as an argument to the diagnostic. But when a field has no
@@ -373,6 +369,10 @@ impl SessionDiagnosticDeriveBuilder {
373
369
374
370
let inner_ty = FieldInnerTy :: from_type ( & info. ty ) ;
375
371
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).
376
376
if attrs. is_empty ( ) {
377
377
let diag = & self . diag ;
378
378
let ident = info. binding . ast ( ) . ident . as_ref ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments