Avoid normalizing SyntaxContext ids in test output #74800
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
PR #72121 affects the output of any test which includes debug-printed
Span
s in its stdout, since the printedSyntaxContext
id will now depend on which foreignSyntaxContext
s have been imported. However, the precise id assigned depends on what macros were expanded inside libcore/libstd, which depends on the platform we are targeting. As a result, including raw SyntaxContext in test output makes that test platform-dependent.Currently, we strip out all SyntaxContext ids to make the test output platform-independent. However, it would be good to perform a more fine-grained normalization: e.g. distinguishing between root and non-root SyntaxContexts, which should hopefully not be platform dependent.
The text was updated successfully, but these errors were encountered: