about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCharles Lew <crlf0710@gmail.com>2021-04-26 01:09:35 +0800
committerCharles Lew <crlf0710@gmail.com>2021-04-29 08:35:08 +0800
commit2f494557baca7101ce0a540e5270fa25026873bb (patch)
tree165f5681a9ce5d192990715d292aa5bec03ed80a
parentae72f1adb9cbf16141f880e9e955723a5fdabf00 (diff)
downloadrust-2f494557baca7101ce0a540e5270fa25026873bb.tar.gz
rust-2f494557baca7101ce0a540e5270fa25026873bb.zip
Implement RFC 1260 with feature_name `imported_main`.
-rw-r--r--clippy_utils/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs
index cd85c487798..e81a92eb74c 100644
--- a/clippy_utils/src/lib.rs
+++ b/clippy_utils/src/lib.rs
@@ -678,7 +678,7 @@ pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[&str]) -> Option<Vec
 pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool {
     cx.tcx
         .entry_fn(LOCAL_CRATE)
-        .map_or(false, |(entry_fn_def_id, _)| def_id == entry_fn_def_id.to_def_id())
+        .map_or(false, |(entry_fn_def_id, _)| def_id == entry_fn_def_id)
 }
 
 /// Returns `true` if the expression is in the program's `#[panic_handler]`.