SIGN IN SIGN UP
rust-lang / rust UNCLAIMED

Empowering everyone to build reliable and efficient software.

0 0 65 Rust

Auto merge of #152277 - gurry:114865-ice-format-args, r=chenyukang

Validate source snippet when format input is raw string



Fixes rust-lang/rust#114865

The issue occurred because the user's proc macro respanned the format arg to an unrelated multi-byte string and we ICE'd by landing in the middle of a multi-byte char.

This PR adds validation that prevents the parser from trying to walk such obviously wrong snippets. Such validation already existed for non-raw strings. This PR adds it for raw strings as well.
B
bors committed
44860d3e9ef700cac0b4a61d924f41f46bf1b447