11 matches across 1 files for func main lang:Markdown lang:Markdown path:compiler/rustc_error_codes/src/error_codes/E0504.md
snippet_mode: auto · sorted by relevance
compiler/rustc_error_codes/src/error_codes/E0504.md MARKDOWN 11 matches · showing 5 view file →
11}
12
13fn main() {
14 let fancy_num = FancyNum { num: 5 };
15 let fancy_ref = &fancy_num;
· · ·
16
17 let x = move || {
18 println!("child function: {}", fancy_num.num);
19 // error: cannot move `fancy_num` into closure because it is borrowed
20 };
· · ·
21
22 x();
23 println!("main function: {}", fancy_ref.num);
24}
25```
· · ·
37}
38
39fn main() {
40 let fancy_num = FancyNum { num: 5 };
41 let fancy_ref = &fancy_num;
· · ·
43 let x = move || {
44 // fancy_ref is usable here because it doesn't move `fancy_num`
45 println!("child function: {}", fancy_ref.num);
46 };
47
+ 6 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.