Function clippy_utils::is_lang_ctor
source · pub fn is_lang_ctor(
cx: &LateContext<'_>,
qpath: &QPath<'_>,
lang_item: LangItem
) -> boolExpand description
Checks if a QPath resolves to a constructor of a LangItem.
For example, use this to check whether a function call or a pattern is Some(..).