Skip to content

test suite: error-pattern annotations are not checked in UI tests #52531

Closed
@petrochenkov

Description

@petrochenkov

Sometimes //~ ERROR attached to a line in the local file cannot be used for testing an error message, because the message is attached to a "remote" span from some other file.
In this case error-pattern annotations can be used in compile-fail tests to check that some diagnostics present in the output regardless of span.

The problem is that such annotations are completely ignored in UI tests and don't check anything, so every such annotation is a potential bug going unnoticed.

error-pattern should either work in UI tests, or some #52175 -like mechanism should be used to remap remote spans into local spans and then //~ ERROR could be used for everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions