You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rust adapter: byte and C raw strings (br"\", cr"\") hide includes and #[path] from the input scan #220
The Rust adapter's input scan (rustInputs in src/repo/adapters/rust.ts) knows raw strings (r"…", r#"…"#), but not byte or C raw strings (br"…", cr"…", br#"…"#). It reads br"\" as the identifier br and then an ordinary string, so the backslash escapes the closing quote and the string runs on into the next lines. Anything in that stretch is never seen, including a computed include! or a #[path] attribute that should force a full run.
This fails open: the crate gets no blocker and no edge, so a change to the file it really loads can skip its tests.
Repro (compiles with rustc; crates/a/src/lib.rs in a two-crate workspace with a and b):
rustAdapter.analyze reports no blockers. With r"\" instead of br"\" it correctly reports Rust computed includes or path attributes require full validation. The same happens with cr"\", br#"…"# and cr#"…"#, and with include!(concat!(env!("OUT_DIR"), "/generated.rs")) in place of the #[path].
This isn't only synthetic. Windows path crates use br"\" a lot: typed-path has it in code and doctests on almost every line of src/windows/non_utf8/components/component.rs.
Fix: let the raw-string branch take an optional b or c prefix. No other change is needed, because the identifier branch runs after it.
changed the title [-]Rust adapter: byte and C raw strings (br"\\", cr"\\") hide includes and #[path] from the input scan[/-][+]Rust adapter: byte and C raw strings (br"\", cr"\") hide includes and #[path] from the input scan[/+]on Nov 17, 2026
Activity
[-]Rust adapter: byte and C raw strings (br"\\", cr"\\") hide includes and #[path] from the input scan[/-][+]Rust adapter: byte and C raw strings (br"\", cr"\") hide includes and #[path] from the input scan[/+]