fitzgen / inlinable_string

An owned, grow-able UTF-8 string that stores small strings inline and avoids heap-allocation.
http://fitzgen.github.io/inlinable_string/inlinable_string/index.html
Other
69 stars 11 forks source link

Yank inlinable_string 0.1.0 #36

Closed KamilaBorowska closed 2 years ago

KamilaBorowska commented 2 years ago

This version doesn't build anymore. It would be appreciated to yank this version to help cargo update -Z minimal-versions.

error[E0283]: type annotations needed
   --> /home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/inlinable_string-0.1.0/src/lib.rs:365:29
    |
365 |                 let mut s = String::from(s.as_ref());
    |                             ^^^^^^^^^^^^ cannot infer type for reference `&_`
    |
    = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
            - impl<> From<&String> for String;
            - impl<> From<&str> for String;

error[E0283]: type annotations needed
   --> /home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/inlinable_string-0.1.0/src/lib.rs:365:44
    |
365 |                 let mut s = String::from(s.as_ref());
    |                                          --^^^^^^--
    |                                          | |
    |                                          | cannot infer type for type parameter `U`
    |                                          this method call resolves to `&T`
    |
note: multiple `impl`s satisfying `InlineString: AsRef<_>` found
   --> /home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/inlinable_string-0.1.0/src/inline_string.rs:67:1
    |
67  | impl AsRef<str> for InlineString {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
76  | impl AsRef<[u8]> for InlineString {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: required because of the requirements on the impl of `AsRef<_>` for `&mut InlineString`
help: use the fully qualified path for the potential candidates
    |
365 |                 let mut s = String::from(<InlineString as AsRef<[u8]>>::as_ref(s));
    |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
365 |                 let mut s = String::from(<InlineString as AsRef<str>>::as_ref(s));
    |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try `rustc --explain E0283`.

This was fixed in inlinable_string 0.1.1 with https://github.com/fitzgen/inlinable_string/commit/5c6b738f0a59a816293c037c4e1f7e62e71ad8f8 (this commit is tagged 0.1.0, but this is incorrect).

ArtemGr commented 2 years ago

NP, 0.1.0 yanked (we can unyank if there's a problem with that).