Skip to content

invalid-module-declaration.rs test regression #53352

Closed
@davidtwco

Description

@davidtwco

As part of #53196, compile-fail tests were migrated to ui tests. In doing this, it was discovered that error patterns were not being applied to ui tests (#52531). invalid-module-declaration.rs is a test that regressed due to this and that regression was not noticed.

The error patterns previously on invalid-module-declaration.rs expected the following errors:

// error-pattern: cannot declare a new module at this location
// error-pattern: maybe move this module

In particular, these check for duplicate module declaration errors - which should arise as the auxiliary folder contains modules that have the same name as those being defined within the test code. However, these errors had not been occuring, and a lack of error pattern assertions meant this wasn't noticed.

At some point in a previous commit these did work, as evidenced by old .stderr files for this test. In #53196, the error pattern annotations were removed in order to get it passing so that PR could land.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions