2 matches across 1 files for TODO lang:Markdown path:src/tools/clippy/book/src/development/trait_checking.md
snippet_mode: auto · sorted by relevance
src/tools/clippy/book/src/development/trait_checking.md MARKDOWN 2 matches view file →
129use clippy_utils::ty::implements_trait;
130
131let ty = todo!("Get the `Foo` type to check for a trait implementation");
132let borrow_id = cx.tcx.get_diagnostic_item(sym::Borrow).unwrap(); // avoid unwrap in real code
133let slice_of_bytes_t = Ty::new_slice(cx.tcx, cx.tcx.types.u8);
· · ·
134let generic_param = slice_of_bytes_t.into();
135if implements_trait(cx, ty, borrow_id, &[generic_param]) {
136 todo!("Rest of lint implementation")
137}
138```
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.