Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

build failed when using rustc 1.92.0-nightly #67

@yizishun

Description

@yizishun

error message is following:

> cargo qemu
    Finished `release` profile [optimized] target(s) in 0.01s
     Running `target/release/xtask qemu`
   Compiling lock_api v0.4.11
   Compiling rustsbi-qemu v0.2.0-alpha.3 (/home/yzs/rcore/rustsbi-qemu/rustsbi-qemu)
   Compiling riscv v0.10.1
   Compiling uart16550 v0.0.1
   Compiling rustsbi-macros v0.0.2
   Compiling aclint v0.0.0
   Compiling fast-trap v0.0.1
error: unsafe attribute used without unsafe
   --> /home/yzs/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/fast-trap-0.0.1/src/hal/riscv/mod.rs:111:3
    |
111 | #[naked]
    |   ^^^^^ usage of unsafe attribute
    |
help: wrap the attribute in `unsafe(...)`
    |
111 | #[unsafe(naked)]
    |   +++++++     +

error: unsafe attribute used without unsafe
  --> /home/yzs/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aclint-0.0.0/src/lib.rs:77:7
   |
77 |     #[naked]
   |       ^^^^^ usage of unsafe attribute
   |
help: wrap the attribute in `unsafe(...)`
   |
77 |     #[unsafe(naked)]
   |       +++++++     +

error: unsafe attribute used without unsafe
  --> /home/yzs/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aclint-0.0.0/src/lib.rs:99:7
   |
99 |     #[naked]
   |       ^^^^^ usage of unsafe attribute
   |
help: wrap the attribute in `unsafe(...)`
   |
99 |     #[unsafe(naked)]
   |       +++++++     +
...

i make some change

diff --git a/rustsbi-qemu/Cargo.toml b/rustsbi-qemu/Cargo.toml
index db3113b..179e35e 100644
--- a/rustsbi-qemu/Cargo.toml
+++ b/rustsbi-qemu/Cargo.toml
@@ -22,10 +22,10 @@ sbi-spec = { version = "0.0.7", features = ["legacy"] }
 riscv = "0.10.1"
 spin = "0.9"
 rcore-console = "0.0.0"
-aclint = "0.0.0"
+aclint = { git = "https://github.com/rustsbi/aclint", branch = "main" }
 sifive-test-device = "0.0.0"
 dtb-walker = "=0.2.0-alpha.3"
 uart16550 = "0.0.1"
 
 hsm-cell = { path = "../hsm-cell" }
-fast-trap = { version = "=0.0.1", features = ["riscv-m"] }
+fast-trap = { git = "https://github.com/rustsbi/fast-trap.git", branch = "main", features = ["riscv-m"] }

but still get:

> cargo qemu
    Finished `release` profile [optimized] target(s) in 0.01s
     Running `target/release/xtask qemu`
   Compiling rustsbi-qemu v0.2.0-alpha.3 (/home/yzs/rcore/rustsbi-qemu/rustsbi-qemu)
error: unsafe attribute used without unsafe
  --> rustsbi-qemu/src/trap_stack.rs:11:3
   |
11 | #[naked]
   |   ^^^^^ usage of unsafe attribute
   |
help: wrap the attribute in `unsafe(...)`
   |
11 | #[unsafe(naked)]
   |   +++++++     +

error: unsafe attribute used without unsafe
  --> rustsbi-qemu/src/trap_vec.rs:11:3
   |
11 | #[naked]
   |   ^^^^^ usage of unsafe attribute
   |
help: wrap the attribute in `unsafe(...)`
   |
11 | #[unsafe(naked)]
   |   +++++++     +

error: unsafe attribute used without unsafe
...

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

    Issue actions