17 matches across 1 files for func main lang:Markdown path:compiler/rustc_error_codes/src/error_codes/E0277.md
snippet_mode: grep · sorted by relevance
compiler/rustc_error_codes/src/error_codes/E0277.md MARKDOWN 17 matches · showing 5 view file →
10}
11
12// we now declare a function which takes an object implementing the Foo trait
13fn some_func<T: Foo>(foo: T) {
14 foo.bar();
· · ·
13fn some_func<T: Foo>(foo: T) {
14 foo.bar();
15}
· · ·
16
17fn main() {
18 // we now call the method with the i32 type, which doesn't implement
19 // the Foo trait
· · ·
20 some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied
21}
22```
· · ·
35}
36
37fn some_func<T: Foo>(foo: T) {
38 foo.bar(); // we can now use this method since i32 implements the
39 // Foo trait
+ 12 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.