about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-05-11 12:00:59 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2021-05-12 13:58:42 +0200
commitb03b74734b35649a92500686347a8678b48746e5 (patch)
tree8981ada520142b7b29e601e6d29f0ca8b6eb4e36
parentc5a3f1c30633b09db91d7af82141a23641c8a70e (diff)
downloadrust-b03b74734b35649a92500686347a8678b48746e5.tar.gz
rust-b03b74734b35649a92500686347a8678b48746e5.zip
Use () for entry_fn.
-rw-r--r--clippy_utils/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs
index 9a0b72f06bb..9ac9500b4eb 100644
--- a/clippy_utils/src/lib.rs
+++ b/clippy_utils/src/lib.rs
@@ -60,7 +60,7 @@ use rustc_ast::ast::{self, Attribute, BorrowKind, LitKind};
 use rustc_data_structures::fx::FxHashMap;
 use rustc_hir as hir;
 use rustc_hir::def::{DefKind, Res};
-use rustc_hir::def_id::{DefId, LOCAL_CRATE};
+use rustc_hir::def_id::DefId;
 use rustc_hir::intravisit::{self, walk_expr, ErasedMap, FnKind, NestedVisitorMap, Visitor};
 use rustc_hir::LangItem::{ResultErr, ResultOk};
 use rustc_hir::{
@@ -677,7 +677,7 @@ pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[&str]) -> Option<Vec
 /// Returns `true` if the provided `def_id` is an entrypoint to a program.
 pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool {
     cx.tcx
-        .entry_fn(LOCAL_CRATE)
+        .entry_fn(())
         .map_or(false, |(entry_fn_def_id, _)| def_id == entry_fn_def_id)
 }