File tree 2 files changed +4
-6
lines changed
rustc_codegen_ssa/src/back
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1817,7 +1817,7 @@ impl Emitter for SharedEmitter {
1817
1817
drop ( self . sender . send ( SharedEmitterMessage :: Diagnostic ( Diagnostic {
1818
1818
msgs : diag. messages . clone ( ) ,
1819
1819
args : args. clone ( ) ,
1820
- code : diag. code . clone ( ) ,
1820
+ code : diag. code ,
1821
1821
lvl : diag. level ( ) ,
1822
1822
} ) ) ) ;
1823
1823
for child in & diag. children {
Original file line number Diff line number Diff line change @@ -1252,7 +1252,7 @@ impl DiagCtxtInner {
1252
1252
// be stored. Instead, they are buffered until the `LintExpectationId` is replaced by
1253
1253
// a stable one by the `LintLevelsBuilder`.
1254
1254
if let Some ( LintExpectationId :: Unstable { .. } ) = diagnostic. level . get_expectation_id ( ) {
1255
- self . unstable_expect_diagnostics . push ( diagnostic. clone ( ) ) ;
1255
+ self . unstable_expect_diagnostics . push ( diagnostic) ;
1256
1256
return None ;
1257
1257
}
1258
1258
@@ -1267,16 +1267,14 @@ impl DiagCtxtInner {
1267
1267
DelayedBug ( DelayedBugKind :: Normal ) => {
1268
1268
let backtrace = std:: backtrace:: Backtrace :: capture ( ) ;
1269
1269
self . span_delayed_bugs
1270
- . push ( DelayedDiagnostic :: with_backtrace ( diagnostic. clone ( ) , backtrace) ) ;
1271
-
1270
+ . push ( DelayedDiagnostic :: with_backtrace ( diagnostic, backtrace) ) ;
1272
1271
#[ allow( deprecated) ]
1273
1272
return Some ( ErrorGuaranteed :: unchecked_claim_error_was_emitted ( ) ) ;
1274
1273
}
1275
1274
DelayedBug ( DelayedBugKind :: GoodPath ) => {
1276
1275
let backtrace = std:: backtrace:: Backtrace :: capture ( ) ;
1277
1276
self . good_path_delayed_bugs
1278
- . push ( DelayedDiagnostic :: with_backtrace ( diagnostic. clone ( ) , backtrace) ) ;
1279
-
1277
+ . push ( DelayedDiagnostic :: with_backtrace ( diagnostic, backtrace) ) ;
1280
1278
return None ;
1281
1279
}
1282
1280
_ => { }
You can’t perform that action at this time.
0 commit comments