Skip to content

Commit c047110

Browse files
committed
Warn for Rust 2024 compatibility
This adds warnings for Rust 2024 compatibility so that backtrace can be used in std (which will be migrating to 2024) without actually changing the edition here (due to MSRV). This should help prevent any regressions until backtrace can move to Rust 2024 (1.85). This bumps the MSRV to support `unsafe extern`. This allows some lints that are relatively noisy and do not usually prevent use in 2024. These can all be removed when migrating to 2024 in the future.
1 parent e33eaac commit c047110

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ jobs:
256256
with:
257257
submodules: true
258258
- name: Install Rust
259-
run: rustup update 1.79.0 --no-self-update && rustup default 1.79.0
259+
run: rustup update 1.82.0 --no-self-update && rustup default 1.82.0
260260
- run: cargo build
261261

262262
miri:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ autoexamples = true
1414
autotests = true
1515
edition = "2021"
1616
exclude = ["/ci/"]
17-
rust-version = "1.79.0"
17+
rust-version = "1.82.0"
1818

1919
[workspace]
2020
members = ['crates/cpp_smoke_test', 'crates/as-if-std']

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@
9191
feature(sgx_platform)
9292
)]
9393
#![warn(rust_2018_idioms)]
94+
#![warn(rust_2024_compatibility)]
95+
#![allow(
96+
edition_2024_expr_fragment_specifier,
97+
tail_expr_drop_order
98+
)]
9499
// When we're building as part of libstd, silence all warnings since they're
95100
// irrelevant as this crate is developed out-of-tree.
96101
#![cfg_attr(backtrace_in_libstd, allow(warnings))]

0 commit comments

Comments
 (0)