-
Couldn't load subscription status.
- Fork 13.9k
Provide helpful diagnostics for shebang lookalikes #137619
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an ui test for this
This comment has been minimized.
This comment has been minimized.
a5be7fa to
c748002
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good! Sorry for the wait. Some small comments
|
Thanks, I love it! @bors r+ rollup |
Rollup of 9 pull requests Successful merges: - rust-lang#134720 (Display valid crate types in error message for --crate-type flag) - rust-lang#137619 (Provide helpful diagnostics for shebang lookalikes) - rust-lang#138353 (remove must_use from <*const T>::expose_provenance) - rust-lang#138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`) - rust-lang#138469 (remove comment regarding a removed test directive) - rust-lang#138477 (Deny impls for `BikeshedGuaranteedNoDrop`) - rust-lang#138485 (Rustc dev guide subtree update) - rust-lang#138487 (Pass `CI_JOB_DOC_URL` to Docker) - rust-lang#138495 (Take a break from reviews) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137619 - Pyr0de:issue_137249, r=fmease Provide helpful diagnostics for shebang lookalikes When `[` is not found after a `#!`, a note will be added to the exisiting error ``` error: expected `[`, found `/` --> src/main.rs:2:3 | 2 | #!/usr/bin/env -S cargo +nightly -Zscript | ^ expected `[` | = note: the token sequence `#!` here looks like the start of a shebang interpreter directive but it is not = help: if you meant this to be a shebang interpreter directive, move it to the very start of the file ``` Fixes rust-lang#137249 r? `@fmease`
Rollup of 9 pull requests Successful merges: - rust-lang#134720 (Display valid crate types in error message for --crate-type flag) - rust-lang#137619 (Provide helpful diagnostics for shebang lookalikes) - rust-lang#138353 (remove must_use from <*const T>::expose_provenance) - rust-lang#138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`) - rust-lang#138469 (remove comment regarding a removed test directive) - rust-lang#138477 (Deny impls for `BikeshedGuaranteedNoDrop`) - rust-lang#138485 (Rustc dev guide subtree update) - rust-lang#138487 (Pass `CI_JOB_DOC_URL` to Docker) - rust-lang#138495 (Take a break from reviews) r? `@ghost` `@rustbot` modify labels: rollup
When
[is not found after a#!, a note will be added to the exisiting errorFixes #137249
r? @fmease