Theoretical breaking change from a combination of frontmatter and include! (original) (raw)

With rustc 1.87, compiling the following pair of files succeeds:

main.rs:

fn main() { let _ = include!("expression.inc"); }

expression.inc:

With rustc 1.88 or 1.89 (or rustc 1.91.0-nightly (160e7623e 2025-08-26)), compilation fails.

With 1.89 the first error message is

error: invalid infostring for frontmatter
 --> src/expression.inc:1:4
  |
1 | ---1
  |    ^
  |
  = note: frontmatter infostrings must be a single identifier immediately following the opening

See #145520 for a similar issue with TokenStream::from_str.