nightly rustc -Z ast-json
generates malformed json
#31025
Labels
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
In #30565, @michaelwoerister changed the encoding of
syntax::codemap::Span
from serializing the value as a singleu64
into serializing two sequentialu32
values. Unfortunately this violates the serialization protocol, and causes a span likemk_sp(0, 10)
to be serialized as010
. Here's the current implementation:Semantically speaking these spans should be serialized as a tuple, which would properly delimit the two values, but since that'd add a bunch of tagging overhead to the output, it'd probably be more efficient to just restore the old encoding:
The text was updated successfully, but these errors were encountered: