Skip to content

Commit

Permalink
Unnecessary to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkuu committed Jul 27, 2018
1 parent 8296699 commit 4c1cb75
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/librustc_codegen_llvm/back/symbol_export.rs
Expand Up @@ -206,9 +206,8 @@ fn exported_symbols_provider_local<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
})
.collect();

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

symbols.push((exported_symbol, SymbolExportLevel::C));
}
Expand Down

0 comments on commit 4c1cb75

Please sign in to comment.