oli-obk / ui_test

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

Feature request: comments in "//@" lines #277

Closed RalfJung closed 2 months ago

RalfJung commented 2 months ago

It can be quite useful to have the explanation for a //@ line in that same line, e.g. when grepping for all "ignore"/"only" patterns that have a shared comment, with the intent of reviewing/updating them all.

So maybe we could accept something like this?

//@ignore-target: windows # No libs env support on Windows

Not sure if the character for a comment should be # or //. This should work with all flags, i.e. also //@compile-flags: etc.

oli-obk commented 2 months ago

I like this. We can nuke the concept of //@check-pass: comments here and make everything after the : meaningful (or error), unless another // appears.

RalfJung commented 2 months ago

I lean slightly towards "#" for comments so that we do not end up with two "//" in the same line, which looks odd.