shssoichiro/zxcvbn-rs

Does not build with Rust 1.36.0

Geobert opened this issue · 3 comments

error[E0277]: `(dyn matching::Matcher + 'static)` cannot be sent between threads safely
  --> C:\Users\Geob\.cargo\registry\src\github.com-1ecc6299db9ec823\zxcvbn-1.0.1\src\matching\mod.rs:70:1
   |
70 | / lazy_static! {
71 | |     static ref MATCHERS: [Box<Matcher>; 8] = [
72 | |         Box::new(DictionaryMatch {}),
73 | |         Box::new(ReverseDictionaryMatch {}),
...  |
80 | |     ];
81 | | }
   | |_^ `(dyn matching::Matcher + 'static)` cannot be sent between threads safely
   |
   = help: the trait `std::marker::Send` is not implemented for `(dyn matching::Matcher + 'static)`
   = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn matching::Matcher + 'static)>`
   = note: required because it appears within the type `std::boxed::Box<(dyn matching::Matcher + 'static)>`
   = note: required because it appears within the type `[std::boxed::Box<(dyn matching::Matcher + 'static)>; 8]`
   = note: required because of the requirements on the impl of `std::marker::Sync` for `spin::once::Once<[std::boxed::Box<(dyn matching::Matcher + 'static)>; 8]>`
   = note: required because it appears within the type `lazy_static::lazy::Lazy<[std::boxed::Box<(dyn matching::Matcher + 'static)>; 8]>`
   = note: shared static variables must have a type that implements `Sync`
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Just seen that: #21

@shssoichiro,

Would be cool if you can merge and release the related fixes, there are a quite a few downstream projects failing to build with the last rust release.

Regards

Sorry for the delay on this, version 1.0.2 is now published to Cargo.