codegen_llvm_back: use to_owned instead of to_string with string literals

This commit is contained in:
ljedrz
2018-10-06 11:50:00 +02:00
parent 3dbb2cc864
commit 0195d9b95f
4 changed files with 5 additions and 5 deletions

View File

@@ -455,7 +455,7 @@ impl<'a> Drop for DiagnosticHandlers<'a> {
unsafe extern "C" fn report_inline_asm<'a, 'b>(cgcx: &'a CodegenContext,
msg: &'b str,
cookie: c_uint) {
cgcx.diag_emitter.inline_asm_error(cookie as u32, msg.to_string());
cgcx.diag_emitter.inline_asm_error(cookie as u32, msg.to_owned());
}
unsafe extern "C" fn inline_asm_handler(diag: &SMDiagnostic,