Auto merge of #113972 - matthiaskrgr:clones_123, r=cjgillot
remove redundant clones
This commit is contained in:
commit
699f4a637e
@ -353,7 +353,7 @@ impl IntoDiagnostic<'_> for LinkingFailed<'_> {
|
||||
|
||||
let contains_undefined_ref = self.escaped_output.contains("undefined reference to");
|
||||
|
||||
diag.note(format!("{:?}", self.command)).note(self.escaped_output.to_string());
|
||||
diag.note(format!("{:?}", self.command)).note(self.escaped_output);
|
||||
|
||||
// Trying to match an error from OS linkers
|
||||
// which by now we have no way to translate.
|
||||
|
@ -1069,7 +1069,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
} else if let ExprKind::MethodCall(..) = rcvr.kind {
|
||||
err.span_note(
|
||||
sp,
|
||||
modifies_rcvr_note.clone() + ", it is not meant to be used in method chains.",
|
||||
modifies_rcvr_note + ", it is not meant to be used in method chains.",
|
||||
);
|
||||
} else {
|
||||
err.span_note(sp, modifies_rcvr_note);
|
||||
|
@ -104,8 +104,8 @@ pub fn encode_and_write_metadata(tcx: TyCtxt<'_>) -> (EncodedMetadata, bool) {
|
||||
};
|
||||
|
||||
// Load metadata back to memory: codegen may need to include it in object files.
|
||||
let metadata = EncodedMetadata::from_path(metadata_filename.clone(), metadata_tmpdir)
|
||||
.unwrap_or_else(|err| {
|
||||
let metadata =
|
||||
EncodedMetadata::from_path(metadata_filename, metadata_tmpdir).unwrap_or_else(|err| {
|
||||
tcx.sess.emit_fatal(FailedCreateEncodedMetadata { err });
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user