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

Match rustc's new shebang handling #876

Merged
merged 2 commits into from
Aug 3, 2020
Merged

Match rustc's new shebang handling #876

merged 2 commits into from
Aug 3, 2020

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Aug 3, 2020

As of rust-lang/rust#71487 and rust-lang/rust#73596, a file starting with #! is not necessarily a shebang if whitespace/comments after the #! are followed by [, making it an attribute.

#!//am/i/a/comment

fn main() {} // ^ shebang
#!//am/i/a/comment

[allow(dead_code)] // ^ not a shebang
fn main() {}

@dtolnay dtolnay merged commit 5647268 into master Aug 3, 2020
@dtolnay dtolnay deleted the shebang branch August 3, 2020 04:58
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

Successfully merging this pull request may close these issues.

1 participant