Skip to content

Conversation

@Zalathar
Copy link
Contributor

While working on a larger overhaul of directive processing, I ran into difficulty with the has_edition local variable.

Storing the selected edition in TestProps should make it easier to extract parts of directive processing into independent handler functions, because the //@ edition handler won't need access to additional mutable state outside of TestProps.

We still automatically add the edition to compile_flags, because there is too much existing compiletest code relying on that behaviour.

r? jieyouxu

@rustbot
Copy link
Collaborator

rustbot commented Oct 20, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

@rustbot rustbot added the A-compiletest Area: The compiletest test runner label Oct 20, 2025
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 20, 2025
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 20, 2025

📌 Commit e9bcded has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 20, 2025
bors added a commit that referenced this pull request Oct 20, 2025
Rollup of 4 pull requests

Successful merges:

 - #147734 (Further tighten up relaxed bounds)
 - #147888 (enzyme/autodiff is compatible with download-ci=true)
 - #147898 (compiletest: Move `AuxProps` out of `EarlyProps`)
 - #147903 (compiletest: Store the selected edition in `TestProps`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 58345bb into rust-lang:master Oct 20, 2025
11 checks passed
rust-timer added a commit that referenced this pull request Oct 20, 2025
Rollup merge of #147903 - Zalathar:edition, r=jieyouxu

compiletest: Store the selected edition in `TestProps`

While working on a larger overhaul of directive processing, I ran into difficulty with the `has_edition` local variable.

Storing the selected edition in `TestProps` should make it easier to extract parts of directive processing into independent handler functions, because the `//@ edition` handler won't need access to additional mutable state outside of `TestProps`.

We still automatically add the edition to `compile_flags`, because there is too much existing compiletest code relying on that behaviour.

r? jieyouxu
@rustbot rustbot added this to the 1.92.0 milestone Oct 20, 2025
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Oct 20, 2025
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#147734 (Further tighten up relaxed bounds)
 - rust-lang/rust#147888 (enzyme/autodiff is compatible with download-ci=true)
 - rust-lang/rust#147898 (compiletest: Move `AuxProps` out of `EarlyProps`)
 - rust-lang/rust#147903 (compiletest: Store the selected edition in `TestProps`)

r? `@ghost`
`@rustbot` modify labels: rollup
@Zalathar Zalathar deleted the edition branch October 20, 2025 21:53
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 21, 2025
compiletest: More directive handling tweaks

- Follow-up to rust-lang#147903.

---

These are some more preparatory changes that were extracted from a larger overhaul of directive handling that I'm still working on.

---

The revision check was introduced by rust-lang#61778, and later modified by rust-lang#113603. It doesn't appear to be doing anything particularly load-bearing (since a bogus mode seems to cause a panic later anyway), and getting rid of it avoids the need to pass the current test revision to directive-handling code.

- rust-lang#61778
- rust-lang#113603

r? jieyouxu
rust-timer added a commit that referenced this pull request Oct 21, 2025
Rollup merge of #147934 - Zalathar:directive, r=jieyouxu

compiletest: More directive handling tweaks

- Follow-up to #147903.

---

These are some more preparatory changes that were extracted from a larger overhaul of directive handling that I'm still working on.

---

The revision check was introduced by #61778, and later modified by #113603. It doesn't appear to be doing anything particularly load-bearing (since a bogus mode seems to cause a panic later anyway), and getting rid of it avoids the need to pass the current test revision to directive-handling code.

- #61778
- #113603

r? jieyouxu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants