diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-04-15 18:37:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-15 18:37:41 +0000 |
| commit | 9663da39d2aee8ae68d06de75ae122ea27d88281 (patch) | |
| tree | 43b308762f3485eb48ee39a223413b79ac51ae54 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 459897bab1814f602c98cf24b79bfb86062615a0 (diff) | |
| parent | c7640e0f83e51f8c26452a35bab22d079af75d0a (diff) | |
| download | rust-9663da39d2aee8ae68d06de75ae122ea27d88281.tar.gz rust-9663da39d2aee8ae68d06de75ae122ea27d88281.zip | |
Run UI tests in edition 2024 mode (#14602)
The `ui_test` package runs test in edition 2021 mode by default. This PR switches our tests to edition 2024. The commits progressively make our test suite compatible with both edition 2021 and edition 2024, then switches the testing mode to edition 2024, which is compatible with what `cargo dev lint` also uses by default. The changes are (without functionality changes in tests): - Add `unsafe` when [calling unsafe constructs inside `unsafe fn`](https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html), to [unsafe attributes](https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-attributes.html), and to [`extern` blocks](https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-extern.html). - Use stricter reference patterns to accomodate with the [new match ergonomics rules](https://doc.rust-lang.org/edition-guide/rust-2024/match-ergonomics.html). - Add some `use<>` markers where required to keep the same semantics under the [new RPIT lifetime rules](https://doc.rust-lang.org/edition-guide/rust-2024/rpit-lifetime-capture.html). Some other changes ensure that non-regression tests are still enforced: - Add edition 2021 specific tests when switching rules would make some explicitly tested constructs untested, or when the test require using the older [temporary tail expression scoping rules](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-tail-expr-scope.html). - In `misnamed_getters`, check that getters containing an `unsafe` block (for example a getter on an `Union` field) trigger the lint. The last commit switches the default edition for running UI tests to edition 2024. changelog: [`misnamed_getters`]: getters containing an `unsafe` block are also linted
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
