Skip to content

Commit afdf101

Browse files
authored
Update to the latest Rust. (#152)
Strict provenance APIs are now available by default on nightly. And unwinding 0.2.5 fixes compatibility with the latest nightly
1 parent dfda065 commit afdf101

File tree

6 files changed

+6
-14
lines changed

6 files changed

+6
-14
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
matrix:
2525
build: [ubuntu, i686-linux, aarch64-linux, riscv64-linux]
26-
rust: [1.78, nightly-2024-10-12]
26+
rust: [1.78, nightly-2025-01-02]
2727
include:
2828
- build: ubuntu
2929
os: ubuntu-latest
@@ -51,7 +51,7 @@ jobs:
5151
qemu: qemu-riscv64 -L /usr/riscv64-linux-gnu
5252
qemu_target: riscv64-linux-user
5353
host_target: riscv64gc-unknown-linux-gnu
54-
- rust: nightly-2024-10-12
54+
- rust: nightly-2025-01-02
5555
features: nightly
5656
steps:
5757
- uses: actions/checkout@v4

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-all
4444
# Use the unwinding crate if support for unwinding is needed. This depends on
4545
# nightly Rust. And it's not supported on ARM yet.
4646
[target.'cfg(not(target_arch = "arm"))'.dependencies.unwinding]
47-
version = "0.2.4"
47+
version = "0.2.5"
4848
default-features = false
4949
features = ["unwinder"]
5050
optional = true

rust-toolchain.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/lib.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@
1313
)]
1414
// Allow our polyfills to polyfill nightly features.
1515
#![cfg_attr(not(feature = "nightly"), allow(unstable_name_collisions))]
16-
// On nightly, enable strict provenance.
17-
#![cfg_attr(feature = "nightly", feature(strict_provenance))]
18-
#![cfg_attr(feature = "nightly", feature(exposed_provenance))]
19-
#![cfg_attr(
20-
feature = "nightly",
21-
deny(fuzzy_provenance_casts, lossy_provenance_casts)
22-
)]
16+
// Allow `Polyfill` imports to be unused for now.
17+
#![cfg_attr(not(feature = "nightly"), allow(unused_imports))]
2318

2419
#[cfg(all(feature = "alloc", not(feature = "rustc-dep-of-std")))]
2520
extern crate alloc;

src/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<T> Polyfill<T> for *const T {
7777

7878
#[inline]
7979
fn map_addr(self, f: impl FnOnce(usize) -> usize) -> *mut T {
80-
self.with_addr(f(self.addr()))
80+
self.with_addr(f(self.addr())).cast_mut()
8181
}
8282

8383
#[inline]

test-crates/origin-start/src/bin/tls.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![no_std]
55
#![no_main]
66
#![feature(thread_local)]
7-
#![feature(strict_provenance)]
87

98
extern crate alloc;
109

0 commit comments

Comments
 (0)