mozilla/rust — pull request #4482 by ILyoan (2013-01-14 06:10:03+00:00)
Title: allowing the entry point name to be something other than main

fixed #4207

giving a function the attribute `#[main]` makes the function main.

* if there is no function with `#[main]`, the function named 'main' will be the main.
* if there is a function with `#[main]`, the functions named 'main' will be normal functions.
* when `--test` is given, all function with `#[main]` will be stripped out and the main function for testing will be the only function having `#[main]` attribute.