Description
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.