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.
6767```
6868
6969A 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:
7273
7374* ` () `
7475* ` bool `
7576* ` i32 `
77+ <!-- `!` -->
7678* ` Result<T, E> where T: on this list, E: Error `
7779
7880> Note: The implementation of which return types is allowed is the unstable
@@ -113,4 +115,6 @@ fn main() {
113115[ _shebang_ ] : https://en.wikipedia.org/wiki/Shebang_(Unix)
114116[ _utf8 byte order mark_ ] : https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
115117[ 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