File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -67,12 +67,14 @@ apply to the crate as a whole.
67
67
```
68
68
69
69
A crate that contains a ` main ` [ function] can be compiled to an executable. If a
70
- ` main ` function is present, it must take no arguments and its return type must
71
- be one of the following:
70
+ ` main ` function is present, it must take no arguments, must not declare any
71
+ [ trait or lifetime bounds] , must not have any [ where clauses] , and its return
72
+ type must be one of the following:
72
73
73
74
* ` () `
74
75
* ` bool `
75
76
* ` i32 `
77
+ <!-- `!` -->
76
78
* ` Result<T, E> where T: on this list, E: Error `
77
79
78
80
> Note: The implementation of which return types is allowed is the unstable
@@ -113,4 +115,6 @@ fn main() {
113
115
[ _shebang_ ] : https://en.wikipedia.org/wiki/Shebang_(Unix)
114
116
[ _utf8 byte order mark_ ] : https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
115
117
[ function ] : items/functions.html
116
- [ `Termination` ] : ../std/process/trait.Termination.html
118
+ [ `Termination` ] : ../std/process/trait.Termination.html
119
+ [ where clause ] : items/where-clauses.html
120
+ [ trait or lifetime bounds ] : trait-bounds.html
You can’t perform that action at this time.
0 commit comments