Skip to content

build failed with latest nightly #7

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
sunchao opened this issue Mar 29, 2018 · 2 comments
Closed

build failed with latest nightly #7

sunchao opened this issue Mar 29, 2018 · 2 comments

Comments

@sunchao
Copy link

sunchao commented Mar 29, 2018

The build will fail with the latest nightly:

➜  try_from git:(master) cargo build
   Compiling try_from v0.2.2 (file:///private/tmp/try_from)
error[E0034]: multiple applicable items in scope
  --> src/char.rs:49:23
   |
49 |                 match u32::try_from(n)? {
   |                       ^^^^^^^^^^^^^ multiple `try_from` found
...
61 | impl_int_to_char!(i8, i16, i32, i64, isize, u16, u32, u64, usize);
   | ------------------------------------------------------------------ in this macro invocation
   |
note: candidate #1 is defined in the trait `TryFrom`
  --> src/lib.rs:11:5
   |
11 |     fn try_from(T) -> Result<Self, Self::Err>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: to disambiguate the method call, write `TryFrom::try_from(...)` instead
note: candidate #2 is defined in the trait `std::convert::TryFrom`
   = help: to disambiguate the method call, write `std::convert::TryFrom::try_from(...)` instead

error: aborting due to previous error

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

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

I think this is due the recent stabilization of TryFrom trait. See rust-lang/rust#49305.

@tirkarthi
Copy link

Seems the change was reverted for now : rust-lang/rust#49518

@sunchao
Copy link
Author

sunchao commented Apr 2, 2018

Yes - closing this now.

@sunchao sunchao closed this as completed Apr 2, 2018
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