Skip to content

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.

2 participants