Skip to content

Commit b03b747

Browse files
committed
Use () for entry_fn.
1 parent c5a3f1c commit b03b747

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ use rustc_ast::ast::{self, Attribute, BorrowKind, LitKind};
6060
use rustc_data_structures::fx::FxHashMap;
6161
use rustc_hir as hir;
6262
use rustc_hir::def::{DefKind, Res};
63-
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
63+
use rustc_hir::def_id::DefId;
6464
use rustc_hir::intravisit::{self, walk_expr, ErasedMap, FnKind, NestedVisitorMap, Visitor};
6565
use rustc_hir::LangItem::{ResultErr, ResultOk};
6666
use rustc_hir::{
@@ -677,7 +677,7 @@ pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[&str]) -> Option<Vec
677677
/// Returns `true` if the provided `def_id` is an entrypoint to a program.
678678
pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool {
679679
cx.tcx
680-
.entry_fn(LOCAL_CRATE)
680+
.entry_fn(())
681681
.map_or(false, |(entry_fn_def_id, _)| def_id == entry_fn_def_id)
682682
}
683683

0 commit comments

Comments
 (0)