diff options
| author | bors <bors@rust-lang.org> | 2021-04-30 06:59:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-30 06:59:37 +0000 |
| commit | 5491c802c2f6b71070268310644577dd00726fa9 (patch) | |
| tree | bbca319ed505bce326560ff9bb1bf94a656d4580 | |
| parent | bbd81f2fe18686af42b3374663dede7161e22223 (diff) | |
| parent | 2f494557baca7101ce0a540e5270fa25026873bb (diff) | |
| download | rust-5491c802c2f6b71070268310644577dd00726fa9.tar.gz rust-5491c802c2f6b71070268310644577dd00726fa9.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`
| -rw-r--r-- | clippy_utils/src/lib.rs | 2 |
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]`. |
