6 matches across 1 files for func main lang:Markdown lang:Markdown path:compiler/rustc_error_codes/src/error_codes/E0211.md
snippet_mode: auto · sorted by relevance
compiler/rustc_error_codes/src/error_codes/E0211.md MARKDOWN 6 matches · showing 5 view file →
1#### Note: this error code is no longer emitted by the compiler.
2
3You used a function or type which doesn't fit the requirements for where it was
4used. Erroneous code examples:
5
· · ·
13// or:
14
15fn main() -> i32 { 0 }
16// error: main function expects type: `fn() {main}`: expected (), found i32
17
· · ·
16// error: main function expects type: `fn() {main}`: expected (), found i32
17
18// or:
· · ·
37```
38
39For the first code example, please check the function definition. Example:
40
41```
· · ·
47```
48
49The second case example is a bit particular: the main function must always
50have this definition:
51
+ 1 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.