servo / string-cache

String interning for Rust
Apache License 2.0
193 stars 77 forks source link

0.8.5 is a "breaking change" #271

Closed ForsakenHarmony closed 1 year ago

ForsakenHarmony commented 1 year ago
error[E0283]: type annotations needed
  --> {.. snip ..}\browserslist-rs-0.12.3\src\data\caniuse.rs:91:35
   |
91 |     let chrome = CANIUSE_BROWSERS.get(&"chrome".into()).unwrap();
   |                                   ^^^ ---------------- type must be known at this point
   |                                   |
   |                                   cannot infer type of the type parameter `Q` declared on the associated function `get`
   |
   = note: multiple `impl`s satisfying `Atom<BrowserNameAtomStaticSet>: Borrow<_>` found in the following crates: `core`, `string_cache`:
           - impl<Static> Borrow<str> for Atom<Static>
             where Static: StaticAtomSet;
           - impl<T> Borrow<T> for T
             where T: ?Sized;
note: required by a bound in `AHashMap::<K, V, S>::get`
  --> {.. snip ..}\ahash-0.7.6\src\hash_map.rs:81:12
   |
81 |         K: Borrow<Q>,
   |            ^^^^^^^^^ required by this bound in `AHashMap::<K, V, S>::get`
help: consider specifying the generic argument
   |
91 |     let chrome = CANIUSE_BROWSERS.get::<Q>(&"chrome".into()).unwrap();
   |                                      +++++

I think this was caused by https://github.com/servo/string-cache/pull/266, reverting to 0.8.4 fixes the error

YoniFeng commented 1 year ago

Can confirm, I've been looking at the same the same issue wanting to bump string_cache for swc - https://github.com/swc-project/swc/pull/6980

realtimetodie commented 1 year ago

0.8.5 needs to be yanked @mrobinson

realtimetodie commented 1 year ago

Blocks https://github.com/swc-project/swc/pull/6973

mrobinson commented 1 year ago

0.8.5 is now yanked.

realtimetodie commented 1 year ago

Thank you