fast_rustc_ap_rustc_lexer

Function strip_shebang

Source
pub fn strip_shebang(input: &str) -> Option<usize>
Expand description

rustc allows files to have a shebang, e.g. “#!/usr/bin/rustrun”, but shebang isn’t a part of rust syntax, so this function skips the line if it starts with a shebang (“#!”). Line won’t be skipped if it represents a valid Rust syntax (e.g. “#![deny(missing_docs)]”).