summaryrefslogtreecommitdiff
path: root/src/librustc/middle/entry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc/middle/entry.rs')
-rw-r--r--src/librustc/middle/entry.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/middle/entry.rs b/src/librustc/middle/entry.rs
index 2add525f094..6b593a1a9f9 100644
--- a/src/librustc/middle/entry.rs
+++ b/src/librustc/middle/entry.rs
@@ -86,7 +86,7 @@ fn entry_point_type(item: &Item, at_root: bool) -> EntryPointType {
EntryPointType::Start
} else if attr::contains_name(&item.attrs, "main") {
EntryPointType::MainAttr
- } else if item.name == "main" {
+ } else if item.ident.name == "main" {
if at_root {
// This is a top-level function so can be 'main'.
EntryPointType::MainNamed