Closed blt-r closed 1 year ago
rustc already can ignore the shebang. And cargo-script RFC was accepted (https://github.com/rust-lang/cargo/issues/12207).
rustc
cargo-script
This is a valid rust:
#!/usr/bin/env -S cargo +nightly -Zscript fn main() { println!("Hello from cargo script") }
But it isn't parsed
It is also documented in https://doc.rust-lang.org/reference/crates-and-source-files.html#shebang
rustc
already can ignore the shebang. Andcargo-script
RFC was accepted (https://github.com/rust-lang/cargo/issues/12207).This is a valid rust:
But it isn't parsed