Skip to content

Make warning for having both #[main] and #[start] #18115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
klutzy opened this issue Oct 17, 2014 · 1 comment
Closed

Make warning for having both #[main] and #[start] #18115

klutzy opened this issue Oct 17, 2014 · 1 comment

Comments

@klutzy
Copy link
Contributor

klutzy commented Oct 17, 2014

Since #[start] takes precedence over #[main], #[main] is ignored. This may lead to surprising result.
For example, if #[start] exists, rustc --test produces executable which just runs start function rather than test runner.

It would be good if rustc emits warning if there are too many start-related attributes.

@steveklabnik
Copy link
Member

closing as dup of #11766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants