Closed gotoco closed 2 years ago
The generated struct is not visible in the the tests
modules. Like in any submodules. See https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=96378b02cb8edf608e958dca0bd696d8 for a maybe simpler example. Like the compile error message says, you need to import it with the use
statetement in the tests
modules.
Thanks, I wasn't aware of that. After using the use statement with correct structure solved the issue.
Closing the issue
Hi! I am writing some helper library where I need to use bit fields to process some structures.
I started with the example code and simple test to see if I can write some tests, but unfortunately something is not working fine. I tried first example/bits_position.rs and it compiles/runs. Now when I am trying to rewrite example to be a test it fails to recognize
BitsLocations
andBitsLocationsMsb0
.My src/lib.rs is
This code is causing compilation error:
Appreciate any help or tips what I am doing wrong...