Skip to content

Commit 5491c80

Browse files
committed
Auto merge of rust-lang#84401 - crlf0710:impl_main_by_path, r=petrochenkov
Implement RFC 1260 with feature_name `imported_main`. This is the second extraction part of rust-lang#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 rust-lang#28937 r? `@petrochenkov`
2 parents bbd81f2 + 2f49455 commit 5491c80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[&str]) -> Option<Vec
678678
pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool {
679679
cx.tcx
680680
.entry_fn(LOCAL_CRATE)
681-
.map_or(false, |(entry_fn_def_id, _)| def_id == entry_fn_def_id.to_def_id())
681+
.map_or(false, |(entry_fn_def_id, _)| def_id == entry_fn_def_id)
682682
}
683683

684684
/// Returns `true` if the expression is in the program's `#[panic_handler]`.

0 commit comments

Comments
 (0)