Skip to content

compiletest: warn if we see a // @<directive-name> #125813

Open
@jieyouxu

Description

@jieyouxu

Realized in #125808 (comment).

A test writer might accidentally write

// @ignore-cross-compile

which is parsed as a normal comment not a compiletest directive because compiletest directives require that the line starts with //@.

This typo is hard to spot: both by PR authors and the reviewers. It might not fail in PR CI -- it might not even fail in full build CI, but then explode when the conditions are just right.

We should detect these and issue at least warnings from compiletest to help test writers realize the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compiletestArea: The compiletest test runnerA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions