77 matches across 1 files for func main lang:Rust path:src/tools/clippy/clippy_utils/src/lib.rs
snippet_mode: auto · sorted by relevance
src/tools/clippy/clippy_utils/src/lib.rs RUST 77 matches · showing 5 view file →
214///
215/// The current context is determined based on the current body which is set before calling a lint's
216/// entry point (any function on `LateLintPass`). If you need to check in a different context use
217/// `tcx.hir_is_inside_const_context(_)`.
218///
· · ·
394}
395
396/// Checks if the `def_id` belongs to a function that is part of a trait impl.
397pub fn is_def_id_trait_method(cx: &LateContext<'_>, def_id: LocalDefId) -> bool {
398 if let Node::Item(item) = cx.tcx.parent_hir_node(cx.tcx.local_def_id_to_hir_id(def_id))
· · ·
570pub fn is_default_equivalent_call(
571 cx: &LateContext<'_>,
572 repl_func: &Expr<'_>,
573 whole_call_expr: Option<&Expr<'_>>,
574) -> bool {
· · ·
575 if let ExprKind::Path(ref repl_func_qpath) = repl_func.kind
576 && let Some(repl_def) = cx.qpath_res(repl_func_qpath, repl_func.hir_id).opt_def(cx)
577 && (repl_def.assoc_fn_parent(cx).is_diag_item(cx, sym::Default)
· · ·
576 && let Some(repl_def) = cx.qpath_res(repl_func_qpath, repl_func.hir_id).opt_def(cx)
577 && (repl_def.assoc_fn_parent(cx).is_diag_item(cx, sym::Default)
578 || is_default_equivalent_ctor(cx, repl_def.1, repl_func_qpath))
+ 72 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.