Skip to content

01_wait_forever error: unused import: raspberrypi::* with Rust 1.82.0 #219

Open
@ChocolateLoverRaj

Description

@ChocolateLoverRaj

Rust versions tested:

cargo 1.84.0-nightly (8c30ce536 2024-10-15)
cargo 1.82.0 (8f40fc59f 2024-08-21)

I get the error with both of the versions.

Output:

make qemu

Compiling kernel ELF - rpi3
   Compiling mingo v0.1.0 (/home/rajas/Documents/rust-raspberrypi-OS-tutorials/01_wait_forever)
error: unused import: `raspberrypi::*`
  --> src/bsp.rs:11:9
   |
11 | pub use raspberrypi::*;
   |         ^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`

error: could not compile `mingo` (bin "kernel") due to 1 previous error
make: *** [Makefile:123: target/aarch64-unknown-none-softfloat/release/kernel] Error 101

make qemu runs successfully If I comment out the unused line:

// #[cfg(any(feature = "bsp_rpi3", feature = "bsp_rpi4"))]
// pub use raspberrypi::*;

OS: NixOS
Flake I'm using for devShell:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    rust-overlay.url = "github:oxalica/rust-overlay";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        overlays = [ (import rust-overlay) ];
        pkgs = import nixpkgs {
          inherit system overlays;
        };
      in
      {
        devShells.default = with pkgs; mkShell {
          buildInputs = [
            (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
              extensions = [ "rust-src" "llvm-tools-preview" ];
              targets = [ "aarch64-unknown-none-softfloat" ];
            }))
            cargo-bootimage
            qemu
            gnumake
            cargo-binutils
            rustfilt
          ];
        };
      }
    );
}

Activity

changed the title [-]01_wait_forever error: unused import: `raspberrypi::*`[/-] [+]01_wait_forever error: unused import: `raspberrypi::*` with Rust 1.84.0-nightly[/+] on Oct 18, 2024
changed the title [-]01_wait_forever error: unused import: `raspberrypi::*` with Rust 1.84.0-nightly[/-] [+]01_wait_forever error: unused import: `raspberrypi::*` with Rust 1.82.0[/+] on Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ChocolateLoverRaj

        Issue actions

          01_wait_forever error: unused import: `raspberrypi::*` with Rust 1.82.0 · Issue #219 · rust-embedded/rust-raspberrypi-OS-tutorials