Skip to content

Switch to Rust 2024#2461

Merged
mkeeter merged 3 commits intomasterfrom
mkeeter/edition-2024
Apr 9, 2026
Merged

Switch to Rust 2024#2461
mkeeter merged 3 commits intomasterfrom
mkeeter/edition-2024

Conversation

@mkeeter
Copy link
Copy Markdown
Collaborator

@mkeeter mkeeter commented Apr 2, 2026

(staged on top of #2460)

This PR switches us to Rust 2024, and fixes all of the required follow-up changes to keep Clippy happy (mostly let chains). It's broken into standalone commits, each of which performs one type of fix.

@mkeeter mkeeter requested a review from hawkw April 2, 2026 17:59
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from 67c0b71 to dc275d2 Compare April 2, 2026 18:02
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from 30056a8 to 4c6288c Compare April 2, 2026 18:06
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch 2 times, most recently from e8531fb to 1ec4922 Compare April 2, 2026 18:09
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from 4c6288c to 95f4e88 Compare April 2, 2026 18:09
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from 1ec4922 to 33da10c Compare April 2, 2026 18:47
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from 95f4e88 to 9cdcfbd Compare April 2, 2026 18:47
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from 33da10c to e8cce91 Compare April 2, 2026 19:02
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from 9cdcfbd to c88120b Compare April 2, 2026 19:02
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from e8cce91 to d00e8e5 Compare April 2, 2026 20:27
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from c88120b to 9a8d020 Compare April 2, 2026 20:27
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch 4 times, most recently from a38d65f to c72ffac Compare April 6, 2026 16:25
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch 2 times, most recently from d896b44 to c3eb851 Compare April 6, 2026 18:41
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from c72ffac to a57c33a Compare April 6, 2026 18:41
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from c3eb851 to 79db0c2 Compare April 7, 2026 13:57
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from a57c33a to 04a2c66 Compare April 7, 2026 13:57
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from 79db0c2 to cb136f9 Compare April 8, 2026 20:02
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from 04a2c66 to 6dddafd Compare April 8, 2026 20:02
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from cb136f9 to c479d87 Compare April 8, 2026 20:06
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from 6dddafd to 1263b01 Compare April 8, 2026 20:06
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from c479d87 to 58c6142 Compare April 8, 2026 20:29
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from 1263b01 to 34231b8 Compare April 8, 2026 20:29
@mkeeter mkeeter force-pushed the mkeeter/pre-edition-2024 branch from 58c6142 to e892d83 Compare April 8, 2026 20:31
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from 34231b8 to 14cd69b Compare April 8, 2026 20:31
Base automatically changed from mkeeter/pre-edition-2024 to master April 8, 2026 20:53
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from 14cd69b to f03caf8 Compare April 8, 2026 20:53
@mkeeter mkeeter requested a review from Copilot April 8, 2026 20:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR migrates the workspace to Rust edition 2024 and applies the mechanical follow-up changes required to keep Clippy/builds clean (notably let-chains, #[unsafe(...)] attributes, and import/style adjustments).

Changes:

  • Bump crate manifests across the repo from edition = "2021" to edition = "2024".
  • Update Rust sources to satisfy Rust 2024/lint requirements (let-chains, #[unsafe(export_name = ...)], minor formatting).
  • Apply consistent import ordering and small formatting touch-ups across drivers/libs/build tooling.

Reviewed changes

Copilot reviewed 299 out of 440 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/cosmo/Cargo.toml edition=2024
app/demo-stm32f4-discovery/Cargo.toml edition=2024
app/demo-stm32g0-nucleo/Cargo.toml edition=2024
app/demo-stm32h7-nucleo/Cargo.toml edition=2024
app/demo-stm32h7-nucleo/src/main.rs import order tweak
app/donglet/Cargo.toml edition=2024
app/gemini-bu/Cargo.toml edition=2024
app/gimlet/Cargo.toml edition=2024
app/gimletlet/Cargo.toml edition=2024
app/grapefruit/Cargo.toml edition=2024
app/lpc55xpresso/Cargo.toml edition=2024
app/medusa/Cargo.toml edition=2024
app/minibar/Cargo.toml edition=2024
app/oxcon2023g0/Cargo.toml edition=2024
app/oxide-rot-1/Cargo.toml edition=2024
app/psc/Cargo.toml edition=2024
app/rot-carrier/Cargo.toml edition=2024
app/sidecar/Cargo.toml edition=2024
build/call_rustfmt/Cargo.toml edition=2024
build/call_rustfmt/src/lib.rs import order tweak
build/fpga-regmap/Cargo.toml edition=2024
build/fpga-regmap/src/lib.rs import order tweak
build/i2c/Cargo.toml edition=2024
build/i2c/src/lib.rs let-chains + formatting
build/kconfig/Cargo.toml edition=2024
build/lpc55pins/Cargo.toml edition=2024
build/lpc55pins/src/lib.rs import order tweak
build/net/Cargo.toml edition=2024
build/phash-gen/Cargo.toml edition=2024
build/phash-gen/src/lib.rs import order tweak
build/spi/Cargo.toml edition=2024
build/stm32xx-sys/Cargo.toml edition=2024
build/stm32xx-sys/src/lib.rs formatting tweak
build/toml-patch/Cargo.toml edition=2024
build/toml-patch/src/lib.rs import order tweak
build/util/Cargo.toml edition=2024
build/util/src/lib.rs import order tweak
build/xtask/Cargo.toml edition=2024
build/xtask/src/auxflash.rs import order tweak
build/xtask/src/caboose_pos.rs import order tweak
build/xtask/src/clippy.rs import order tweak
build/xtask/src/config.rs import order tweak
build/xtask/src/dist.rs import order + formatting
build/xtask/src/elf.rs import order tweak
build/xtask/src/gha_prepare_artifacts.rs formatting tweak
build/xtask/src/graph.rs import order tweak
build/xtask/src/lsp.rs import order tweak
build/xtask/src/main.rs import order tweak
build/xtask/src/print.rs import order tweak
build/xtask/src/sizes.rs import order + formatting
build/xtask/src/task_slot.rs import order tweak
doc/guide/servers.adoc Rust 2024 unsafe attribute update in docs
drv/auxflash-api/Cargo.toml edition=2024
drv/auxflash-api/src/lib.rs import order tweak
drv/auxflash-server/Cargo.toml edition=2024
drv/auxflash-server/src/main.rs import order tweak
drv/caboose-pos/Cargo.toml edition=2024
drv/caboose/Cargo.toml edition=2024
drv/cosmo-hf/Cargo.toml edition=2024
drv/cosmo-hf/src/apob.rs import order tweak
drv/cosmo-hf/src/hf.rs import order tweak
drv/cosmo-hf/src/main.rs import order tweak
drv/cosmo-seq-server/Cargo.toml edition=2024
drv/cosmo-seq-server/src/main.rs import order + formatting
drv/cosmo-seq-server/src/vcore.rs import order tweak
drv/cpu-power-state/Cargo.toml edition=2024
drv/cpu-seq-api/Cargo.toml edition=2024
drv/cpu-seq-api/src/lib.rs import order tweak
drv/eeprom/Cargo.toml edition=2024
drv/eeprom/src/main.rs import order tweak
drv/fpga-api/Cargo.toml edition=2024
drv/fpga-api/src/lib.rs add missing semicolon
drv/fpga-devices/Cargo.toml edition=2024
drv/fpga-devices/src/ecp5.rs import order tweak
drv/fpga-devices/src/ecp5_spi.rs import order tweak
drv/fpga-devices/src/ecp5_spi_mux_pca9538.rs import order tweak
drv/fpga-server/Cargo.toml edition=2024
drv/fpga-server/src/main.rs import order tweak
drv/fpga-user-api/Cargo.toml edition=2024
drv/grapefruit-seq-server/Cargo.toml edition=2024
drv/grapefruit-seq-server/src/main.rs import order tweak
drv/hash-api/Cargo.toml edition=2024
drv/hash-api/src/lib.rs import order tweak
drv/hf-api/Cargo.toml edition=2024
drv/hf-api/src/lib.rs import order tweak
drv/i2c-api/Cargo.toml edition=2024
drv/i2c-api/src/lib.rs import order tweak
drv/i2c-devices/Cargo.toml edition=2024
drv/i2c-devices/src/at24csw080.rs import order tweak
drv/i2c-devices/src/bmr491.rs import order tweak
drv/i2c-devices/src/emc2305.rs import order tweak
drv/i2c-devices/src/isl68224.rs import order tweak
drv/i2c-devices/src/lib.rs import order tweak in macros
drv/i2c-devices/src/lm5066.rs import order tweak
drv/i2c-devices/src/lm5066i.rs import order tweak
drv/i2c-devices/src/ltc4282.rs import order tweak
drv/i2c-devices/src/max31790.rs import order tweak
drv/i2c-devices/src/max5970.rs import order tweak
drv/i2c-devices/src/mwocp68.rs import order + semicolon/formatting
drv/i2c-devices/src/raa229618.rs import order tweak
drv/i2c-devices/src/raa229620a.rs import order tweak
drv/i2c-devices/src/tps546b24a.rs import order tweak
drv/i2c-types/Cargo.toml edition=2024
drv/ice40-spi-program/Cargo.toml edition=2024
drv/ice40-spi-program/src/lib.rs import order tweak
drv/ignition-api/Cargo.toml edition=2024
drv/ignition-flash/Cargo.toml edition=2024
drv/ignition-flash/src/main.rs import order tweak
drv/ignition-server/Cargo.toml edition=2024
drv/ignition-server/src/main.rs let-chains + import order
drv/ksz8463/Cargo.toml edition=2024
drv/local-vpd/Cargo.toml edition=2024
drv/lpc55-flash/Cargo.toml edition=2024
drv/lpc55-gpio-api/Cargo.toml edition=2024
drv/lpc55-gpio-api/src/lib.rs import order tweak
drv/lpc55-gpio/Cargo.toml edition=2024
drv/lpc55-gpio/src/main.rs import order + formatting
drv/lpc55-i2c/Cargo.toml edition=2024
drv/lpc55-i2c/src/main.rs import order tweak
drv/lpc55-iocon-gen/Cargo.toml edition=2024
drv/lpc55-sha256/Cargo.toml edition=2024
drv/lpc55-spi-server/Cargo.toml edition=2024
drv/lpc55-spi/Cargo.toml edition=2024
drv/lpc55-sprot-server/Cargo.toml edition=2024
drv/lpc55-sprot-server/src/handler.rs import order tweak
drv/lpc55-sprot-server/src/main.rs import order tweak
drv/lpc55-swd/Cargo.toml edition=2024
drv/lpc55-swd/build.rs formatting tweak
drv/lpc55-swd/src/main.rs import order tweak
drv/lpc55-syscon-api/Cargo.toml edition=2024
drv/lpc55-syscon/Cargo.toml edition=2024
drv/lpc55-syscon/src/main.rs import order tweak
drv/lpc55-update-api/Cargo.toml edition=2024
drv/lpc55-update-api/src/lib.rs import order tweak
drv/lpc55-update-server/Cargo.toml edition=2024
drv/lpc55-update-server/src/main.rs add missing semicolons
drv/lpc55-usart/Cargo.toml edition=2024
drv/mb85rsxx-fram/Cargo.toml edition=2024
drv/meanwell-api/Cargo.toml edition=2024
drv/meanwell/Cargo.toml edition=2024
drv/medusa-seq-api/Cargo.toml edition=2024
drv/medusa-seq-api/src/lib.rs import order tweak
drv/medusa-seq-server/Cargo.toml edition=2024
drv/medusa-seq-server/src/front_io.rs import order tweak
drv/medusa-seq-server/src/main.rs let-chains + formatting
drv/minibar-ignition-server/Cargo.toml edition=2024
drv/minibar-ignition-server/src/main.rs let-chains
drv/minibar-seq-api/Cargo.toml edition=2024
drv/minibar-seq-api/src/lib.rs minor re-export order tweak
drv/minibar-seq-server/Cargo.toml edition=2024
drv/minibar-seq-server/src/main.rs import order tweak
drv/mock-gimlet-hf-server/Cargo.toml edition=2024
drv/mock-gimlet-hf-server/src/main.rs import order tweak
drv/mock-gimlet-seq-server/Cargo.toml edition=2024
drv/monorail-api/Cargo.toml edition=2024
drv/monorail-api/src/lib.rs import order tweak
drv/onewire-devices/Cargo.toml edition=2024
drv/onewire/Cargo.toml edition=2024
drv/oxide-vpd/Cargo.toml edition=2024
drv/oxide-vpd/src/lib.rs import order tweak
drv/packrat-vpd-loader/Cargo.toml edition=2024
drv/packrat-vpd-loader/src/lib.rs import order tweak
drv/psc-psu-update/Cargo.toml edition=2024
drv/psc-psu-update/src/main.rs let-chains
drv/psc-seq-api/Cargo.toml edition=2024
drv/psc-seq-server/Cargo.toml edition=2024
drv/psc-seq-server/src/main.rs import order tweak
drv/qspi-api/Cargo.toml edition=2024
drv/rng-api/Cargo.toml edition=2024
drv/rng-api/src/lib.rs import order tweak
drv/sbrmi-api/Cargo.toml edition=2024
drv/sbrmi/Cargo.toml edition=2024
drv/sidecar-front-io/Cargo.toml edition=2024
drv/sidecar-front-io/src/phy_smi.rs import order tweak
drv/sidecar-front-io/src/transceivers.rs import order + formatting
drv/sidecar-mainboard-controller/Cargo.toml edition=2024
drv/sidecar-mainboard-i2c-emulator/Cargo.toml edition=2024
drv/sidecar-seq-api/Cargo.toml edition=2024
drv/sidecar-seq-server/Cargo.toml edition=2024
drv/sidecar-seq-server/src/front_io.rs import order tweak
drv/sidecar-seq-server/src/main.rs let-chains + formatting
drv/sp-ctrl-api/Cargo.toml edition=2024
drv/spartan7-loader-api/Cargo.toml edition=2024
drv/spartan7-loader/Cargo.toml edition=2024
drv/spartan7-loader/src/main.rs import order tweak
drv/spartan7-spi-program/Cargo.toml edition=2024
drv/spi-api/Cargo.toml edition=2024
drv/spi-api/build.rs import order tweak
drv/sprot-api/Cargo.toml edition=2024
drv/sprot-api/src/lib.rs import order + semicolons
drv/stm32fx-rcc/Cargo.toml edition=2024
drv/stm32fx-rcc/src/main.rs add missing semicolons
drv/stm32fx-usart/Cargo.toml edition=2024
drv/stm32g0-usart/Cargo.toml edition=2024
drv/stm32h7-dbgmcu/Cargo.toml edition=2024
drv/stm32h7-eth/Cargo.toml edition=2024
drv/stm32h7-fmc-demo-server/Cargo.toml edition=2024
drv/stm32h7-fmc-demo-server/src/main.rs import order tweak
drv/stm32h7-hash-server/Cargo.toml edition=2024
drv/stm32h7-hash-server/src/main.rs import order tweak
drv/stm32h7-hash/Cargo.toml edition=2024
drv/stm32h7-qspi/Cargo.toml edition=2024
drv/stm32h7-qspi/src/lib.rs import order tweak
drv/stm32h7-rng/Cargo.toml edition=2024
drv/stm32h7-spi-server-core/Cargo.toml edition=2024
drv/stm32h7-spi-server-core/build.rs import order tweak
drv/stm32h7-spi-server-core/src/lib.rs let-chains
drv/stm32h7-spi-server/Cargo.toml edition=2024
drv/stm32h7-spi-server/src/main.rs import order tweak
drv/stm32h7-spi/Cargo.toml edition=2024
drv/stm32h7-sprot-server/Cargo.toml edition=2024
drv/stm32h7-sprot-server/src/main.rs import order tweak
drv/stm32h7-startup/Cargo.toml edition=2024
drv/stm32h7-update-api/Cargo.toml edition=2024
drv/stm32h7-update-api/src/lib.rs import order tweak
drv/stm32h7-update-server/Cargo.toml edition=2024
drv/stm32h7-update-server/src/main.rs import order + semicolons
drv/stm32h7-usart/Cargo.toml edition=2024
drv/stm32xx-gpio-common/Cargo.toml edition=2024
drv/stm32xx-i2c-server/Cargo.toml edition=2024
drv/stm32xx-i2c/Cargo.toml edition=2024
drv/stm32xx-i2c/src/lib.rs let-chains
drv/stm32xx-sys-api/Cargo.toml edition=2024
drv/stm32xx-sys/Cargo.toml edition=2024
drv/stm32xx-sys/src/main.rs import order + formatting
drv/stm32xx-uid/Cargo.toml edition=2024
drv/transceivers-api/Cargo.toml edition=2024
drv/transceivers-api/src/lib.rs import order tweak
drv/transceivers-server/Cargo.toml edition=2024
drv/transceivers-server/src/main.rs import order tweak
drv/transceivers-server/src/udp.rs import order tweak
drv/update-api/Cargo.toml edition=2024
drv/user-leds-api/Cargo.toml edition=2024
drv/user-leds/Cargo.toml edition=2024
drv/vsc-err/Cargo.toml edition=2024
drv/vsc7448/Cargo.toml edition=2024
drv/vsc7448/src/dev.rs import order tweak
drv/vsc7448/src/lib.rs import order tweak
drv/vsc7448/src/miim_phy.rs import order tweak
drv/vsc7448/src/port.rs import order tweak
drv/vsc85xx/Cargo.toml edition=2024
drv/vsc85xx/src/atom.rs import order tweak
drv/vsc85xx/src/lib.rs import order tweak
drv/vsc85xx/src/tesla.rs import order tweak
drv/vsc85xx/src/util.rs import order tweak
drv/vsc85xx/src/viper.rs import order tweak
drv/vsc85xx/src/vsc8562.rs import order tweak
lib/armv6m-atomic-hack/Cargo.toml edition=2024
lib/armv8-m-mpu/Cargo.toml edition=2024
lib/counters/Cargo.toml edition=2024
lib/counters/derive/Cargo.toml edition=2024
lib/counters/derive/src/lib.rs let-chains + import order
lib/derive-idol-err/Cargo.toml edition=2024
lib/derive-idol-err/src/lib.rs import order tweak
lib/dice/Cargo.toml edition=2024
lib/dice/src/cert.rs import order tweak
lib/dice/src/handoff.rs import order tweak
lib/dice/src/mfg.rs import order tweak
lib/endoscope-abi/Cargo.toml edition=2024
lib/endoscope-abi/src/lib.rs import order tweak
lib/endoscope/Cargo.toml edition=2024
lib/endoscope/src/main.rs import order tweak
lib/endoscope/src/shared.rs re-export order tweak
lib/fixedmap/Cargo.toml edition=2024
lib/gnarle/Cargo.toml edition=2024
lib/host-sp-messages/Cargo.toml edition=2024
lib/host-sp-messages/src/lib.rs import order tweak
lib/lpc55-puf/Cargo.toml edition=2024
lib/lpc55-rom-data/Cargo.toml edition=2024
lib/lpc55-romapi/Cargo.toml edition=2024
lib/lpc55-rot-startup/Cargo.toml edition=2024
lib/lpc55-rot-startup/src/dice_mfg_usart.rs import order tweak
lib/lpc55-rot-startup/src/images.rs import order tweak
lib/lpc55-usart/Cargo.toml edition=2024
lib/measurement-handoff/Cargo.toml edition=2024
lib/multitimer/Cargo.toml edition=2024
lib/multitimer/src/lib.rs test import order tweak
lib/mutable-statics/Cargo.toml edition=2024
lib/oxide-barcode/Cargo.toml edition=2024
lib/oxide-barcode/src/lib.rs formatting tweak
lib/phash/Cargo.toml edition=2024
lib/ringbuf/Cargo.toml edition=2024
lib/ringbuf/src/lib.rs let-chains
lib/snitch-core/Cargo.toml edition=2024
lib/stage0-handoff/Cargo.toml edition=2024
lib/stage0-handoff/src/rot_update_details.rs import order tweak
lib/static-cell/Cargo.toml edition=2024
lib/task-config/Cargo.toml edition=2024
lib/task-config/src/lib.rs import order tweak
lib/toml-task/Cargo.toml edition=2024
lib/toml-task/src/lib.rs import order tweak
lib/unwrap-lite/Cargo.toml edition=2024
lib/update-buffer/Cargo.toml edition=2024

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread drv/stm32xx-sys/src/main.rs
Comment thread lib/ringbuf/src/lib.rs Outdated
@mkeeter mkeeter force-pushed the mkeeter/edition-2024 branch from f03caf8 to 05cfb4a Compare April 9, 2026 13:37
@mkeeter mkeeter merged commit 05302d6 into master Apr 9, 2026
180 checks passed
@mkeeter mkeeter deleted the mkeeter/edition-2024 branch April 9, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants