Skip to content

[Bug] Mac Intel 环境配置遇到代码bug #98

Open
@Rainweic

Description

@Rainweic

Describe the bug
cd os之后进行make run,遇到以下报错

error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
  --> src/drivers/block/virtio_blk.rs:18:32
   |
18 |     virtio_blk: UPIntrFreeCell<VirtIOBlk<'static>>,
   |                                ^^^^^^^^^ expected 1 generic argument
   |
note: struct defined here, with 1 generic parameter: `H`
  --> /Users/new/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/1581eae/src/blk.rs:13:12
   |
13 | pub struct VirtIOBlk<'a, H: Hal> {
   |            ^^^^^^^^^     -
help: add missing generic argument
   |
18 |     virtio_blk: UPIntrFreeCell<VirtIOBlk<'static, H>>,
   |                                                 +++

error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
  --> src/drivers/gpu/mod.rs:19:25
   |
19 |     gpu: UPIntrFreeCell<VirtIOGpu<'static>>,
   |                         ^^^^^^^^^ expected 1 generic argument
   |
note: struct defined here, with 1 generic parameter: `H`
  --> /Users/new/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/1581eae/src/gpu.rs:15:12
   |
15 | pub struct VirtIOGpu<'a, H: Hal> {
   |            ^^^^^^^^^     -
help: add missing generic argument
   |
19 |     gpu: UPIntrFreeCell<VirtIOGpu<'static, H>>,
   |                                          +++

error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
  --> src/drivers/input/mod.rs:21:35
   |
21 | struct VirtIOINPUT(UPIntrFreeCell<VirtIOInput<'static>>);
   |                                   ^^^^^^^^^^^ expected 1 generic argument
   |
note: struct defined here, with 1 generic parameter: `H`
  --> /Users/new/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/1581eae/src/input.rs:12:12
   |
12 | pub struct VirtIOInput<'a, H: Hal> {
   |            ^^^^^^^^^^^     -
help: add missing generic argument
   |
21 | struct VirtIOINPUT(UPIntrFreeCell<VirtIOInput<'static, H>>);
   |                                                      +++

Environment (please complete the following information):

  • OS: MacOS Intel版本
  • Rust Version: rustc 1.64.0-nightly (9a7b7d5e5 2022-07-19)
  • QEMU Version: QEMU emulator version 7.0.0 (brew安装)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions