diff options
| author | Charles Lew <crlf0710@gmail.com> | 2021-04-26 01:09:35 +0800 |
|---|---|---|
| committer | Charles Lew <crlf0710@gmail.com> | 2021-04-29 08:35:08 +0800 |
| commit | d261df4a72e60e8baa0f21b67eba8f7b91cc2135 (patch) | |
| tree | 4547e05f08c17033fdc8da3d03415010f213d82c /src/tools/clippy/clippy_utils | |
| parent | 727d101561f9b1e81c6282943292d990288ca479 (diff) | |
| download | rust-d261df4a72e60e8baa0f21b67eba8f7b91cc2135.tar.gz rust-d261df4a72e60e8baa0f21b67eba8f7b91cc2135.zip | |
Implement RFC 1260 with feature_name `imported_main`.
Diffstat (limited to 'src/tools/clippy/clippy_utils')
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_utils/src/lib.rs b/src/tools/clippy/clippy_utils/src/lib.rs index cd85c487798..e81a92eb74c 100644 --- a/src/tools/clippy/clippy_utils/src/lib.rs +++ b/src/tools/clippy/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]`. |
