Skip to content

An attempt to convert into std::sync::Arc<str> from std::convert::From<&str> #10

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

Closed
Relrin opened this issue Jan 10, 2018 · 3 comments
Closed

Comments

@Relrin
Copy link

Relrin commented Jan 10, 2018

Hello!

I'm trying building a test project with dependencies (code, and so on) that were mentioned in PR#2 for lapin-futures-tls crate, but instead of getting a successfully compiled code, I'm receiving the following error:

   Compiling coco v0.1.1
   Compiling num-integer v0.1.35
   Compiling unreachable v1.0.0
   Compiling tokio-timer v0.1.2
   Compiling base64 v0.6.0
   Compiling idna v0.1.4
   Compiling bytes v0.4.6
   Compiling abstract-ns v0.4.2
error[E0277]: the trait bound `std::sync::Arc<str>: std::convert::From<&str>` is not satisfied
  --> /Users/savicvalera/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/abstract-ns-0.4.2/src/name.rs:67:23
   |
67 |         Ok(Name(value.into()))
   |                       ^^^^ the trait `std::convert::From<&str>` is not implemented for `std::sync::Arc<str>`
   |
   = help: the following implementations were found:
             <std::sync::Arc<T> as std::convert::From<T>>
   = note: required because of the requirements on the impl of `std::convert::Into<std::sync::Arc<str>>` for `&str`

error: aborting due to previous error

error: Could not compile `abstract-ns`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Do you have any ideas how to fix this issue? I'd tried to clean up cargo caches and indices, but it wasn't helped.

@Relrin Relrin changed the title An attempt to convert std::sync::Arc<str> from std::convert::From<&str> An attempt to convert into std::sync::Arc<str> from std::convert::From<&str> Jan 10, 2018
@tailhook
Copy link
Owner

You need rust at least 1.21.0 (specifically this feature: rust-lang/rust#42565)

@Relrin
Copy link
Author

Relrin commented Jan 11, 2018

Got it! Thank you so much for the answer.

@Relrin Relrin closed this as completed Jan 11, 2018
@tailhook
Copy link
Owner

You're welcome! Let me know if you have any other issues. I'm interested in both positive and negative feedback.

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

No branches or pull requests

2 participants