summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-30 06:59:37 +0000
committerbors <bors@rust-lang.org>2021-04-30 06:59:37 +0000
commitbcd696d722c04a0f8c34d884aa4ed2322f55cdd8 (patch)
tree82e40b44740bbb8be5e15042af512b455d66742d /compiler/rustc_codegen_llvm/src
parenta45f0d724ed7116ed475fb0d628bc118418e7cbf (diff)
parentd261df4a72e60e8baa0f21b67eba8f7b91cc2135 (diff)
downloadrust-bcd696d722c04a0f8c34d884aa4ed2322f55cdd8.tar.gz
rust-bcd696d722c04a0f8c34d884aa4ed2322f55cdd8.zip
Auto merge of #84401 - crlf0710:impl_main_by_path, r=petrochenkov
Implement RFC 1260 with feature_name `imported_main`.

This is the second extraction part of #84062 plus additional adjustments.
This (mostly) implements RFC 1260.

However there's still one test case failure in the extern crate case. Maybe `LocalDefId` doesn't work here? I'm not sure.

cc https://github.com/rust-lang/rust/issues/28937
r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
index e157a38aa03..b928e903730 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
@@ -344,7 +344,7 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
             spflags |= DISPFlags::SPFlagOptimized;
         }
         if let Some((id, _)) = self.tcx.entry_fn(LOCAL_CRATE) {
-            if id.to_def_id() == def_id {
+            if id == def_id {
                 spflags |= DISPFlags::SPFlagMainSubprogram;
             }
         }