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

crate does not compile as no_std #58

Closed
ccbrown opened this issue Apr 11, 2022 · 2 comments · Fixed by #59
Closed

crate does not compile as no_std #58

ccbrown opened this issue Apr 11, 2022 · 2 comments · Fixed by #59

Comments

@ccbrown
Copy link

ccbrown commented Apr 11, 2022

cargo check --no-default-features --features alloc

Results in:

    Checking thingbuf v0.1.1 (/Users/chris/repos/github.com/hawkw/thingbuf)
error[E0433]: failed to resolve: could not find `unreachable_unchecked` in the crate root
   --> src/macros.rs:100:16
    |
100 |         crate::unreachable_unchecked!(@inner , format_args!(": {}", format_args!($($arg)*)))
    |                ^^^^^^^^^^^^^^^^^^^^^ could not find `unreachable_unchecked` in the crate root
    |
   ::: src/util/panic.rs:25:9
    |
25  |         unreachable_unchecked!("code compiled with no_std cannot unwind!")
    |         ------------------------------------------------------------------ in this macro invocation
    |
    = note: this error originates in the macro `unreachable_unchecked` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:169:9
    |
169 |         test_println!("Core::close");
    |         ---------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:185:9
    |
185 |         test_println!("push_ref");
    |         ------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:224:25
    |
224 |                         test_println!("claimed tail slot [{}]", idx);
    |                         -------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:235:33
    |
235 | ...                   test_println!("-> initialized");
    |                       ------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:240:33
    |
240 | ...                   test_println!("-> recycled");
    |                       ---------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:270:21
    |
270 |                     test_println!("channel full");
    |                     ----------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:285:9
    |
285 |         test_println!("pop_ref");
    |         ------------------------ in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:322:25
    |
322 |                         test_println!("claimed head slot [{}]", idx);
    |                         -------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:352:25
    |
352 |                         test_println!("--> channel full!");
    |                         ---------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/lib.rs:478:9
    |
478 |         test_println!("drop Ref<{}>", core::any::type_name::<T>());
    |         ---------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
  --> src/macros.rs:7:17
   |
7  |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
   |                 ^^^^^^^
   |
  ::: src/wait.rs:79:9
   |
79 |         test_println!("WAKING TASK {:?} (from {:?})", self, thread::current());
   |         ---------------------------------------------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:602:9
    |
602 |         test_println!("List::remove({:p})", node);
    |         ----------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:578:9
    |
578 |         test_println!("List::dequeue({:?}) -> {:p}", new_state, last);
    |         ------------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:549:9
    |
549 |         test_println!("List::enqueue({:p})", waiter);
    |         -------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:473:9
    |
473 |         test_println!("Waiter::remove({:p})", self);
    |         ------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:444:9
    |
444 |         test_println!("WaitQueue::close()");
    |         ----------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:399:9
    |
399 |         test_println!("WaitQueue::notify_slow(state: {})", state);
    |         --------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:371:9
    |
371 |         test_println!("WaitQueue::notify()");
    |         ------------------------------------ in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:327:9
    |
327 |         test_println!("WaitQueue::continue_wait_slow({:p})", node);
    |         ---------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:302:9
    |
302 |         test_println!("WaitQueue::continue_wait({:p})", node);
    |         ----------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:209:9
    |
209 |         test_println!("WaitQueue::start_wait_slow({:p})", node);
    |         ------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/queue.rs:189:9
    |
189 |         test_println!("WaitQueue::start_wait({:p})", node);
    |         -------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/cell.rs:161:9
    |
161 |         test_println!("notifying; close={:?};", close);
    |         ---------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/wait/cell.rs:112:17
    |
112 |                 test_println!("-> was notified; state={:?}", actual);
    |                 ---------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
  --> src/macros.rs:7:17
   |
7  |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
   |                 ^^^^^^^
   |
  ::: src/wait/cell.rs:89:9
   |
89 |         test_println!("-> locked!");
   |         --------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
  --> src/macros.rs:7:17
   |
7  |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
   |                 ^^^^^^^
   |
  ::: src/wait/cell.rs:66:9
   |
66 |         test_println!("registering waiter");
   |         ----------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
  --> src/macros.rs:7:17
   |
7  |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
   |                 ^^^^^^^
   |
  ::: src/util.rs:60:9
   |
60 |         test_println!("thread::yield_now()");
   |         ------------------------------------ in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
  --> src/macros.rs:7:17
   |
7  |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
   |                 ^^^^^^^
   |
  ::: src/util.rs:57:13
   |
57 |             test_println!("hint::spin_loop() (x{})", 1 << self.0);
   |             ----------------------------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
  --> src/macros.rs:7:17
   |
7  |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
   |                 ^^^^^^^
   |
  ::: src/util/mutex/spin_impl.rs:93:9
   |
93 |         test_println!("unlocked!");
   |         -------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
  --> src/macros.rs:7:17
   |
7  |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
   |                 ^^^^^^^
   |
  ::: src/util/mutex/spin_impl.rs:48:9
   |
48 |         test_println!("-> locked {}!", core::any::type_name::<T>());
   |         ----------------------------------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
  --> src/macros.rs:7:17
   |
7  |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
   |                 ^^^^^^^
   |
  ::: src/util/mutex/spin_impl.rs:40:9
   |
40 |         test_println!("locking {}...", core::any::type_name::<T>());
   |         ----------------------------------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
    --> src/macros.rs:7:17
     |
7    |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
     |                 ^^^^^^^
     |
    ::: src/mpsc/async_impl.rs:1358:9
     |
1358 |         test_println!("SendRefFuture::drop({:p})", self);
     |         ------------------------------------------------ in this macro invocation
     |
     = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
    --> src/macros.rs:7:17
     |
7    |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
     |                 ^^^^^^^
     |
    ::: src/mpsc/async_impl.rs:1299:9
     |
1299 |         test_println!("SendRefFuture::poll({:p})", self);
     |         ------------------------------------------------ in this macro invocation
     |
     = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/mpsc.rs:484:9
    |
484 |         test_println!("notifying tx ({})", core::any::type_name::<N>());
    |         --------------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/mpsc.rs:476:9
    |
476 |         test_println!("notifying rx ({})", core::any::type_name::<N>());
    |         --------------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/mpsc.rs:395:21
    |
395 |                     test_println!("-> yield");
    |                     ------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/mpsc.rs:382:13
    |
382 |             test_println!("poll_recv_ref => loop");
    |             -------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/mpsc.rs:380:9
    |
380 |         test_println!("poll_recv_ref");
    |         ------------------------------ in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `println` in this scope
   --> src/macros.rs:7:17
    |
7   |                 println!("[PANIC {:>30}:{:<3}] {}", file!(), line!(), format_args!($($arg)*))
    |                 ^^^^^^^
    |
   ::: src/mpsc.rs:322:13
    |
322 |             test_println!("draining_queue");
    |             ------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/mpsc.rs:322:13
    |
322 |             test_println!("draining_queue");
    |             ------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/mpsc.rs:380:9
    |
380 |         test_println!("poll_recv_ref");
    |         ------------------------------ in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/mpsc.rs:382:13
    |
382 |             test_println!("poll_recv_ref => loop");
    |             -------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/mpsc.rs:395:21
    |
395 |                     test_println!("-> yield");
    |                     ------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/mpsc.rs:476:9
    |
476 |         test_println!("notifying rx ({})", core::any::type_name::<N>());
    |         --------------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/mpsc.rs:484:9
    |
484 |         test_println!("notifying tx ({})", core::any::type_name::<N>());
    |         --------------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
    --> src/macros.rs:11:34
     |
11   |                     crate::loom::thread::current().id(),
     |                                  ^^^^^^ could not find `thread` in `loom`
     |
    ::: src/mpsc/async_impl.rs:1299:9
     |
1299 |         test_println!("SendRefFuture::poll({:p})", self);
     |         ------------------------------------------------ in this macro invocation
     |
     = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
    --> src/macros.rs:11:34
     |
11   |                     crate::loom::thread::current().id(),
     |                                  ^^^^^^ could not find `thread` in `loom`
     |
    ::: src/mpsc/async_impl.rs:1358:9
     |
1358 |         test_println!("SendRefFuture::drop({:p})", self);
     |         ------------------------------------------------ in this macro invocation
     |
     = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
  --> src/macros.rs:11:34
   |
11 |                     crate::loom::thread::current().id(),
   |                                  ^^^^^^ could not find `thread` in `loom`
   |
  ::: src/util/mutex/spin_impl.rs:40:9
   |
40 |         test_println!("locking {}...", core::any::type_name::<T>());
   |         ----------------------------------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
  --> src/macros.rs:11:34
   |
11 |                     crate::loom::thread::current().id(),
   |                                  ^^^^^^ could not find `thread` in `loom`
   |
  ::: src/util/mutex/spin_impl.rs:48:9
   |
48 |         test_println!("-> locked {}!", core::any::type_name::<T>());
   |         ----------------------------------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
  --> src/macros.rs:11:34
   |
11 |                     crate::loom::thread::current().id(),
   |                                  ^^^^^^ could not find `thread` in `loom`
   |
  ::: src/util/mutex/spin_impl.rs:93:9
   |
93 |         test_println!("unlocked!");
   |         -------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
  --> src/macros.rs:11:34
   |
11 |                     crate::loom::thread::current().id(),
   |                                  ^^^^^^ could not find `thread` in `loom`
   |
  ::: src/util.rs:57:13
   |
57 |             test_println!("hint::spin_loop() (x{})", 1 << self.0);
   |             ----------------------------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
  --> src/macros.rs:11:34
   |
11 |                     crate::loom::thread::current().id(),
   |                                  ^^^^^^ could not find `thread` in `loom`
   |
  ::: src/util.rs:60:9
   |
60 |         test_println!("thread::yield_now()");
   |         ------------------------------------ in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
  --> src/macros.rs:11:34
   |
11 |                     crate::loom::thread::current().id(),
   |                                  ^^^^^^ could not find `thread` in `loom`
   |
  ::: src/wait/cell.rs:66:9
   |
66 |         test_println!("registering waiter");
   |         ----------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
  --> src/macros.rs:11:34
   |
11 |                     crate::loom::thread::current().id(),
   |                                  ^^^^^^ could not find `thread` in `loom`
   |
  ::: src/wait/cell.rs:89:9
   |
89 |         test_println!("-> locked!");
   |         --------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/cell.rs:112:17
    |
112 |                 test_println!("-> was notified; state={:?}", actual);
    |                 ---------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/cell.rs:161:9
    |
161 |         test_println!("notifying; close={:?};", close);
    |         ---------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:189:9
    |
189 |         test_println!("WaitQueue::start_wait({:p})", node);
    |         -------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:209:9
    |
209 |         test_println!("WaitQueue::start_wait_slow({:p})", node);
    |         ------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:302:9
    |
302 |         test_println!("WaitQueue::continue_wait({:p})", node);
    |         ----------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:327:9
    |
327 |         test_println!("WaitQueue::continue_wait_slow({:p})", node);
    |         ---------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:371:9
    |
371 |         test_println!("WaitQueue::notify()");
    |         ------------------------------------ in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:399:9
    |
399 |         test_println!("WaitQueue::notify_slow(state: {})", state);
    |         --------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:444:9
    |
444 |         test_println!("WaitQueue::close()");
    |         ----------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:473:9
    |
473 |         test_println!("Waiter::remove({:p})", self);
    |         ------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:549:9
    |
549 |         test_println!("List::enqueue({:p})", waiter);
    |         -------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:578:9
    |
578 |         test_println!("List::dequeue({:?}) -> {:p}", new_state, last);
    |         ------------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/wait/queue.rs:602:9
    |
602 |         test_println!("List::remove({:p})", node);
    |         ----------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
  --> src/macros.rs:11:34
   |
11 |                     crate::loom::thread::current().id(),
   |                                  ^^^^^^ could not find `thread` in `loom`
   |
  ::: src/wait.rs:79:9
   |
79 |         test_println!("WAKING TASK {:?} (from {:?})", self, thread::current());
   |         ---------------------------------------------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `thread`
  --> src/wait.rs:79:61
   |
79 |         test_println!("WAKING TASK {:?} (from {:?})", self, thread::current());
   |                                                             ^^^^^^ use of undeclared crate or module `thread`

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:169:9
    |
169 |         test_println!("Core::close");
    |         ---------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `std`
   --> src/lib.rs:170:12
    |
170 |         if std::thread::panicking() {
    |            ^^^ use of undeclared crate or module `std`

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:185:9
    |
185 |         test_println!("push_ref");
    |         ------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:224:25
    |
224 |                         test_println!("claimed tail slot [{}]", idx);
    |                         -------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:235:33
    |
235 | ...                   test_println!("-> initialized");
    |                       ------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:240:33
    |
240 | ...                   test_println!("-> recycled");
    |                       ---------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:270:21
    |
270 |                     test_println!("channel full");
    |                     ----------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:285:9
    |
285 |         test_println!("pop_ref");
    |         ------------------------ in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:322:25
    |
322 |                         test_println!("claimed head slot [{}]", idx);
    |                         -------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:352:25
    |
352 |                         test_println!("--> channel full!");
    |                         ---------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `thread` in `loom`
   --> src/macros.rs:11:34
    |
11  |                     crate::loom::thread::current().id(),
    |                                  ^^^^^^ could not find `thread` in `loom`
    |
   ::: src/lib.rs:478:9
    |
478 |         test_println!("drop Ref<{}>", core::any::type_name::<T>());
    |         ---------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `test_println` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Box` in this scope
  --> src/mpsc/async_impl.rs:72:16
   |
72 |         slots: Box<[Slot<T>]>,
   |                ^^^ not found in this scope
   |
help: consider importing this struct
   |
1  | use alloc::boxed::Box;
   |

error[E0412]: cannot find type `Box` in this scope
   --> src/lib.rs:519:56
    |
519 |     pub(crate) fn make_boxed_array(capacity: usize) -> Box<[Self]> {
    |                                                        ^^^ not found in this scope
    |
help: consider importing this struct
    |
5   | use alloc::boxed::Box;
    |

error[E0392]: parameter `T` is never used
  --> src/mpsc/async_impl.rs:57:25
   |
57 |     pub struct Receiver<T, R = recycling::DefaultRecycle> {
   |                         ^ unused parameter
   |
   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
   = help: if you intended `T` to be a const parameter, use `const T: usize` instead

error[E0392]: parameter `T` is never used
  --> src/mpsc/async_impl.rs:66:23
   |
66 |     pub struct Sender<T, R = recycling::DefaultRecycle> {
   |                       ^ unused parameter
   |
   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
   = help: if you intended `T` to be a const parameter, use `const T: usize` instead

Some errors have detailed explanations: E0392, E0412, E0433.
For more information about an error, try `rustc --explain E0392`.
error: could not compile `thingbuf` due to 85 previous errors

At a glance:

  • There are printlns gated behind if cfg!(test) || cfg!(all(thingbuf_trace, feature = "std")) instead of #[cfg(any(test, all(thingbuf_trace, feature = "std")))].
  • Core::close references std::thread::panicking()
  • Box is used without being imported from alloc::boxed::Box.
@hawkw
Copy link
Owner

hawkw commented Apr 11, 2022

Sorry, my bad; I was checking no-std support manually rather than on CI, which, as we all know, was definitely a mistake. Should have a new release that builds with --no-default-features shortly!

@hawkw hawkw closed this as completed in #59 Apr 11, 2022
hawkw added a commit that referenced this issue Apr 11, 2022
This fixes compilation for no-std targets. My bad --- I was checking
this manually and never added a CI job for it.

This branch adds a CI check that the crate compiles with
`--no-default-features`, and fixes a number of issues that broke the
no-std build:

* f8d9527 fix(no_std): fix warning in `resume_unwind`
* cbf943a fix(no_std): fix compilation error in `unreachable_unchecked`
* 8ae178a fix(no_std): remove use of `thread::panicking`
* dab0d49 fix(alloc): fix missing `Box` imports
* 208defc fix(no_std): wrong feature gate for println macros

Fixes #58

Signed-off-by: Eliza Weisman <[email protected]>
hawkw added a commit that referenced this issue Apr 12, 2022
<a name="v0.1.2"></a>
### v0.1.2 (2022-04-12)

#### Bug Fixes

*   compilation errors with `--no-default-features` (#59) ([a2ab178](a2ab178), closes [#58](#58))
@hawkw
Copy link
Owner

hawkw commented Apr 12, 2022

Version 0.1.2 should fix this, sorry for any inconvenience!

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

Successfully merging a pull request may close this issue.

2 participants