Skip to content

Commit 4c1cb75

Browse files
committed
Unnecessary to_string
1 parent 8296699 commit 4c1cb75

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustc_codegen_llvm/back/symbol_export.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,8 @@ fn exported_symbols_provider_local<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
206206
})
207207
.collect();
208208

209-
if let Some(_) = *tcx.sess.entry_fn.borrow() {
210-
let symbol_name = "main".to_string();
211-
let exported_symbol = ExportedSymbol::NoDefId(SymbolName::new(&symbol_name));
209+
if tcx.sess.entry_fn.borrow().is_some() {
210+
let exported_symbol = ExportedSymbol::NoDefId(SymbolName::new("main"));
212211

213212
symbols.push((exported_symbol, SymbolExportLevel::C));
214213
}

0 commit comments

Comments
 (0)