rust-raspberrypi-OS-tutorials icon indicating copy to clipboard operation
rust-raspberrypi-OS-tutorials copied to clipboard

Remove `asm_const` attribute because it is no longer required

Open ChocolateLoverRaj opened this issue 1 year ago • 3 comments

Description

I got this error:

error: the feature `asm_const` has been stable since 1.82.0 and no longer requires an attribute to enable
   --> src/main.rs:109:12
    |
109 | #![feature(asm_const)]
    |            ^^^^^^^^^
    |
    = note: `-D stable-features` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(stable_features)]`

so I removed the line and created this PR. I tested it in QEMU and it worked. Real HW raspberry Pi is not applicable since it's just tutorial 2.

Pre-commit steps

  • [ ] Tested on QEMU and real HW Rasperry Pi.
    • Not needed if it is just a README change or similar.
  • [ ] Ran ./contributor_setup.sh followed by ./devtool ready_for_publish
    • You'll need Ruby with Bundler and NPM installed locally.
    • If no Rust-related files were changed, ./devtool ready_for_publish_no_rust can be used instead (faster).
    • This step is optional, but much appreciated if done.

ChocolateLoverRaj avatar Oct 18 '24 05:10 ChocolateLoverRaj

If we rely on recent features, we probably need to update https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials/blob/master/rust-toolchain.toml as well.

jannic avatar Oct 18 '24 19:10 jannic

I updated the toolchain. As I go through the tutorials there are more things that need to be changed to work with the latest Rust version. Should I make a PR that updates all tutorials to work? Is there a shortcut for having to modify changes from 03 that also need to be changed from 04 to 20?

ChocolateLoverRaj avatar Oct 18 '24 23:10 ChocolateLoverRaj

I would suggest that you fork this tutorial and work on a branch, fixing things as you go with one commit per fix. Then submit a PR to bring your branch to mainline and we can discuss it.

BartMassey avatar Oct 23 '24 03:10 BartMassey