-
Notifications
You must be signed in to change notification settings - Fork 13.3k
main can be a inner function? #4433
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
Comments
I would not mind forcing |
I think my preference would be that main must be at the root of the crate. I hate when I download some C code and I have to grep around just to find |
Removing from 0.7. I-nominated (well-defined) |
I think the |
If we do this we'll need extra diagnostics to see if there's a 'main' function defined in the wrong place. |
It doesn't have anything to do with resolve and the logic will likely get more involved in the future, after rust-lang#4433
accepted for backwards compat |
Closing as #6119 landed |
It doesn't have anything to do with resolve and the logic will likely get more involved in the future, after rust-lang#4433
Fix some `unnecessary_filter_map` false positives This is a proposed fix for rust-lang#4433. It moves `clone_or_copy_needed` out of `unnecessary_iter_cloned.rs` and into `methods::utils`. It then adds a check of this function to `unnecessary_filter_map::check`. Fixes rust-lang#4433 changelog: none
main function can be a inner function.
for example
I wonder if it's intended.
If not, main should be always at the top crate level.
The text was updated successfully, but these errors were encountered: