diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-05-25 15:11:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-25 15:11:47 +0200 |
| commit | b0ae2280079c55c526f31255cf69b005fe3ddb92 (patch) | |
| tree | 161e510a774b71c6d747b0575631bcf10b7fd4ce /compiler/rustc_mir_transform/src/coverage/counters.rs | |
| parent | aa57e46e24a4a08cc336325e92567b40b0c2ba62 (diff) | |
| parent | f3245e48f98497856fa238f903f738c0681150ee (diff) | |
| download | rust-b0ae2280079c55c526f31255cf69b005fe3ddb92.tar.gz rust-b0ae2280079c55c526f31255cf69b005fe3ddb92.zip | |
Rollup merge of #141413 - est31:cfg_version_env_var, r=jieyouxu
Make #[cfg(version)] respect RUSTC_OVERRIDE_VERSION_STRING The `#[cfg(version(...))]` feature is currently under-tested. Part of it is the difficulty that it is hard to write a test that never changes, while the version of the Rust compiler indeed *does* change. PR #81468 added the first and so far only test of `#[cfg(version(...))]`'s functionality (there is one other test for the *syntax*, that also acts as feature gate). But that test uses a proc macro that parses the version: the text of the test doesn't contain the actual `#[cfg(version(...))]`. This PR makes `#[cfg(version(...))]` respect `RUSTC_OVERRIDE_VERSION_STRING`, added by PR #124339, allowing us to virtually pin the rustc version and write tests from all directions against some specific version. The PR also adds a functional test of `#[cfg(version(...))]` that leverages `RUSTC_OVERRIDE_VERSION_STRING`. Pulled out of #141137. Tracking issue: #64796
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/counters.rs')
0 files changed, 0 insertions, 0 deletions
