Skip to content

build failed with latest nightly #7

Description

@sunchao

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.

Activity

  1. tirkarthi commented on Mar 31, 2018

    @tirkarthi

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

  2. sunchao commented on Apr 2, 2018

    @sunchao
    Author

    Yes - closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions