about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_lexer/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_lexer/src/lib.rs b/src/librustc_lexer/src/lib.rs
index 5ccfc1b276b..0a13783767d 100644
--- a/src/librustc_lexer/src/lib.rs
+++ b/src/librustc_lexer/src/lib.rs
@@ -236,7 +236,7 @@ pub enum Base {
 /// (e.g. "#![deny(missing_docs)]").
 pub fn strip_shebang(input: &str) -> Option<usize> {
     debug_assert!(!input.is_empty());
-    if !input.starts_with("#!") || input.starts_with("#![") {
+    if !input.starts_with("#!") || input.starts_with("#![") || input.starts_with("#! [") {
         return None;
     }
     Some(input.find('\n').unwrap_or(input.len()))