Skip to content
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

Ability to omit fn main() #65

Open
paulkernfeld opened this issue Nov 25, 2018 · 0 comments
Open

Ability to omit fn main() #65

paulkernfeld opened this issue Nov 25, 2018 · 0 comments

Comments

@paulkernfeld
Copy link

It would be nice to be able to write a script like:

#!/usr/bin/env run-cargo-script
println!("1 + 1 = {}", 1 + 1);

Rust's doctests currently support the ability to omit fn main. If I'm looking at the right part of the source code, they parse the code and detect whether there is already a function named main.

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

1 participant