Skip to content

Commit caca96c

Browse files
fix: Use edition 2024 by default (#5)
* fix: picotool attribute needs unsafe * Use edition 2024 by default * Format --------- Co-authored-by: QL <35621141+chaosprint@users.noreply.github.com>
1 parent 0e0eadc commit caca96c

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
edition = "2021"
2+
edition = "2024"
33
name = "rp235x-project-template"
44
version = "0.1.0"
55
license = "MIT OR Apache-2.0"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ If you aren't using a debugger (or want to use other debugging configurations),
3434
<details open="open">
3535
<summary><h2 style="display: inline-block" id="requirements">Requirements</h2></summary>
3636

37-
- The standard Rust tooling (cargo, rustup) which you can install from https://rustup.rs/
37+
- The standard Rust tooling (cargo, rustup) which you can install from <https://rustup.rs/>
38+
39+
Note that, this template targets Rust 2024 edition, which requires Rust 1.85. So, it is recommended to use the latest stable version.
3840

3941
- Toolchain support for the cortex-m33 processors in the rp235x (thumbv8m.main-none-eabihf)
4042

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use embedded_hal::digital::OutputPin;
1010
use panic_probe as _;
1111
use rp235x_hal::clocks::init_clocks_and_plls;
1212
use rp235x_hal::{self as hal, entry};
13-
use rp235x_hal::{pac, Clock};
13+
use rp235x_hal::{Clock, pac};
1414

1515
// Provide an alias for our BSP so we can switch targets quickly.
1616
// Uncomment the BSP you included in Cargo.toml, the rest of the code does not need to change.
@@ -74,7 +74,7 @@ fn main() -> ! {
7474
}
7575

7676
/// Program metadata for `picotool info`
77-
#[link_section = ".bi_entries"]
77+
#[unsafe(link_section = ".bi_entries")]
7878
#[used]
7979
pub static PICOTOOL_ENTRIES: [rp235x_hal::binary_info::EntryAddr; 5] = [
8080
rp235x_hal::binary_info::rp_cargo_bin_name!(),

0 commit comments

Comments
 (0)