Skip to content

Commit

Permalink
Rollup merge of #131382 - ehuss:compiletest-reference, r=jieyouxu
Browse files Browse the repository at this point in the history
Add "reference" as a known compiletest header

This adds the "reference" compiletest header so that the Rust reference can add annotations to the test suite in order to link tests to individual rules in the reference.

Tooling in the reference repo will be responsible for collecting these annotations and linking to the tests.

More details are in MCP 783: rust-lang/compiler-team#783

There is a change from the MCP in that I am not adding the JSON collection to compiletest (at least, not yet). In looking at this more closely, that actually makes things more difficult for our tooling, so I'm leaving it out for now. If in the future it looks like something we want, then I think we can add it later.

There are a few tests here which need adjusting due to the legacy header check. `@jieyouxu` indicated on Zulip that we could potentially remove the legacy header check, in which case those changes can be dropped from this PR.

r? `@jieyouxu`
  • Loading branch information
matthiaskrgr authored Oct 9, 2024
2 parents a1eceec + de60931 commit b76667a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/compiletest/src/command-list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"pretty-compare-only",
"pretty-expanded",
"pretty-mode",
"reference",
"regex-error-pattern",
"remap-src-base",
"revisions",
Expand Down

0 comments on commit b76667a

Please sign in to comment.