RWTH-OS / eduOS-rs

A teaching operating system written in Rust
https://rwth-os.github.io/eduOS-rs/
Apache License 2.0
412 stars 26 forks source link

cargo test: error[E0463]: can't find crate for `test` #24

Closed BaderSZ closed 1 year ago

BaderSZ commented 2 years ago

Running a cargo test --lib on the project fails with the following error Toolchain: nightly-2021-02-01-x86_64-unknown-linux-gnu

bader@prometheus:~/Work/RWTH.ERC/eduOS-rs$ cargo test --lib
   Compiling eduos-rs v0.1.0 (/home/bader/Work/RWTH.ERC/eduOS-rs)
error[E0463]: can't find crate for `test`
   --> src/mm/freelist.rs:203:1
    |
203 | / fn add_element() {
204 | |     let mut freelist = FreeList::new();
205 | |     let entry = FreeListEntry::new(0x10000, 0x100000);
206 | |
...   |
216 | |     }
217 | | }
    | |_^ can't find crate
    |
    = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `eduos-rs`

To learn more, run the command again with --verbose.

What I've tried so far: