From: bors Date: Thu, 26 May 2022 16:33:30 +0000 (+0000) Subject: Auto merge of #8896 - Alexendoo:fn_sig_ice, r=llogiq X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=6553b985408dba318cd93b96eb9ce2b858100635;p=rust.git Auto merge of #8896 - Alexendoo:fn_sig_ice, r=llogiq Only return `DefId`s to `Fn`-like definitions in `clippy_utils::fn_def_id` Fixes #8850 in `returns.rs` `tcx.fn_sig` is called on the result of `fn_def_id`, which panics if the def is a `const`/`static`/etc rather than a functions definition https://github.com/rust-lang/rust-clippy/blob/bc4d39e5fea64970dded1e6d2132d41435c0ef24/clippy_lints/src/returns.rs#L294-L303 changelog: Fix ICE due to callable `static`/`const`s --- 6553b985408dba318cd93b96eb9ce2b858100635