oli-obk / ui_test

A test framework for testing rustc diagnostics output
27 stars 25 forks source link

"//@only-target: windows: Uses win32 api functions" gets accepted but does not behave as expected #276

Closed RalfJung closed 2 months ago

RalfJung commented 2 months ago

When a file has //@only-target: windows: Uses win32 api functions, this file is effectively disabled as the words after the first : are all interpreted as an "only" pattern.

https://github.com/rust-lang/miri/pull/3866 contained some cases of this, so it seems worth to detect that case and raise an error. Maybe we can look for having a : in any of the matchers? No target contains : so this can never occur in a valid "only" filter.