Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build --no-default-features --features loom --cfg loom #64

Closed
jbr opened this issue Mar 30, 2024 · 0 comments · Fixed by #65
Closed

Cannot build --no-default-features --features loom --cfg loom #64

jbr opened this issue Mar 30, 2024 · 0 comments · Fixed by #65

Comments

@jbr
Copy link

jbr commented Mar 30, 2024

Discovered while working on smol-rs/event-listener#126

RUSTFLAGS="--cfg=loom" cargo build --no-default-features --features loom
   Compiling concurrent-queue v2.4.0 (/Users/jbr/code/concurrent-queue)
error[E0425]: cannot find function `spin_loop` in this scope
  --> src/sync.rs:51:5
   |
51 |     spin_loop();
   |     ^^^^^^^^^ not found in this scope
   |
help: consider importing one of these items
   |
42 + use core::hint::spin_loop;
   |
42 + use loom::hint::spin_loop;
   |

warning: unused import: `loom::thread::yield_now`
  --> src/sync.rs:39:20
   |
39 |     pub(crate) use loom::thread::yield_now;
   |                    ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

For more information about this error, try `rustc --explain E0425`.
warning: `concurrent-queue` (lib) generated 1 warning
error: could not compile `concurrent-queue` (lib) due to 1 previous error; 1 warning emitted
                                                                                            
notgull added a commit that referenced this issue Mar 31, 2024
This commit adds loom tests to CI with --no-default-features, then also
fixes a compile error that was introduced in a new version of loom.

Closes #64

Signed-off-by: John Nunley <dev@notgull.net>
notgull added a commit that referenced this issue Mar 31, 2024
This commit adds loom tests to CI with --no-default-features, then also
fixes a compile error that was introduced in a new version of loom.

Closes #64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant