about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-29 06:32:24 +0000
committerbors <bors@rust-lang.org>2018-07-29 06:32:24 +0000
commita5c2d0fffaaf0b764c01bc4066e51ffd475ceae9 (patch)
tree5255142d5e3a48744db52d110ca90950724d69a9 /src/librustc_codegen_llvm
parentfb0653e40289eecf32f3fac1e84fc69b815ce5cb (diff)
parente995a91a314da7df85f5471cbc621874b5d42b53 (diff)
downloadrust-a5c2d0fffaaf0b764c01bc4066e51ffd475ceae9.tar.gz
rust-a5c2d0fffaaf0b764c01bc4066e51ffd475ceae9.zip
Auto merge of #52764 - sinkuu:cleanup, r=nikomatsakis
Misc cleanups
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/back/symbol_export.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/back/symbol_export.rs b/src/librustc_codegen_llvm/back/symbol_export.rs
index 94357f34849..48de2f3beed 100644
--- a/src/librustc_codegen_llvm/back/symbol_export.rs
+++ b/src/librustc_codegen_llvm/back/symbol_export.rs
@@ -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));
     }