Skip to content

Avoid normalizing SyntaxContext ids in test output #74800

Closed
@Aaron1011

Description

@Aaron1011

PR #72121 affects the output of any test which includes debug-printed Spans in its stdout, since the printed SyntaxContext id will now depend on which foreign SyntaxContexts 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions