Closed
Description
Rustc has logic to detect and ignore shebangs
https://github.com/rust-lang/rust/blob/6171d944aea415a3023d4262e0895aa3b18c771f/compiler/rustc_lexer/src/lib.rs#L255-L278
Cargo needs something similar for knowing whether we should look for a frontmatter
cargo/src/cargo/util/toml/embedded.rs
Lines 195 to 215 in e3fa31e
These differ and we need to decide how we want to reconcile these
Originally reported in #14857 (comment)