-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone
Description
Can we treat shebangs as comments for those who like doing #!/usr/bin/env rustx
?
It would be nice to compile or interpret the same Rust code as desired, but currently, when you try to compile Rust code with a shebang, you get an ugly syntax error.
hello.rs:
#!/usr/bin/env rustx
use std;
fn main() {
std::io::println("Hello World!");
}
expected output:
$ rustc hello.rs
$ ./hello
Hello World!
actual output:
$ rustc hello.rs
hello.rs:1:1: 1:2 error: expecting '[' but found '!'
hello.rs:1 #!/usr/bin/env rustx
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.