-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Provide helpful diagnostics for shebang lookalikes #137619
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jieyouxu
requested changes
Feb 25, 2025
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.
fmease
reviewed
Feb 25, 2025
a5be7fa
to
c748002
Compare
Pyr0de
commented
Feb 27, 2025
fmease
approved these changes
Mar 11, 2025
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
fmease
approved these changes
Mar 14, 2025
Thanks, I love it! @bors r+ rollup |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 14, 2025
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
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 14, 2025
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`
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Mar 19, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
[
is not found after a#!
, a note will be added to the exisiting errorFixes #137249
r? @fmease