matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.84k stars 110 forks source link

0.2.1 Fails to Build #26

Closed pimeys closed 5 years ago

pimeys commented 5 years ago

Same for the current master.

    Checking once_cell v0.2.1 (/home/pimeys/code/once_cell)
error[E0599]: no associated item named `INIT` found for type `parking_lot::raw_mutex::RawMutex` in the current scope
   --> src/imp_pl.rs:139:34
    |
139 |         Mutex { inner: RawMutex::INIT }
    |                                  ^^^^ associated item not found in `parking_lot::raw_mutex::RawMutex`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
            `use lock_api::mutex::RawMutex;`

error[E0599]: no method named `lock` found for type `parking_lot::raw_mutex::RawMutex` in the current scope
   --> src/imp_pl.rs:143:20
    |
143 |         self.inner.lock();
    |                    ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
            `use lock_api::mutex::RawMutex;`

error[E0599]: no method named `unlock` found for type `&parking_lot::raw_mutex::RawMutex` in the current scope
   --> src/imp_pl.rs:154:20
    |
154 |         self.inner.unlock();
    |                    ^^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
            `use lock_api::mutex::RawMutex;`

warning: unused import: `lock_api::RawMutex`
 --> src/imp_pl.rs:9:5
  |
9 | use lock_api::RawMutex as _RawMutex;
  |     ^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0599`.
error: Could not compile `once_cell`.

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

Did a cargo update for our crate and were not able to build once_cell anymore.

matklad commented 5 years ago

Thanks for the report!

I've created https://github.com/matklad/once_cell/pull/27, but let's wait for https://github.com/Amanieu/parking_lot/issues/156 to be resolved: if 0.8.1 is yanked, #27 should be adjusted.

matklad commented 5 years ago

issue fixed upstream, pl 0.8.1 is yanked

pimeys commented 5 years ago

Fixed! Thank you. :)