[ 
https://issues.apache.org/jira/browse/THRIFT-4536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chao Sun updated THRIFT-4536:
-----------------------------
    Description: 
When trying to build the library with rustc nightly, I got the following error:
{code}
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling libc v0.2.40
   Compiling cfg-if v0.1.2
   Compiling integer-encoding v1.0.5
   Compiling byteorder v1.2.1
   Compiling try_from v0.2.2
   Compiling log v0.4.1
error[E0034]: multiple applicable items in scope
  --> 
/Users/chao/.cargo/registry/src/github.com-1ecc6299db9ec823/try_from-0.2.2/src/char.rs:46:23
   |
46 |                 match u32::try_from(n)? {
   |                       ^^^^^^^^^^^^^ multiple `try_from` found
...
58 | 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`
  --> 
/Users/chao/.cargo/registry/src/github.com-1ecc6299db9ec823/try_from-0.2.2/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`.
warning: build failed, waiting for other jobs to finish...
error: build failed
{code}

cc [~allengeorge]

  was:
When trying to build the library, I got the following error:
{code}
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling libc v0.2.40
   Compiling cfg-if v0.1.2
   Compiling integer-encoding v1.0.5
   Compiling byteorder v1.2.1
   Compiling try_from v0.2.2
   Compiling log v0.4.1
error[E0034]: multiple applicable items in scope
  --> 
/Users/chao/.cargo/registry/src/github.com-1ecc6299db9ec823/try_from-0.2.2/src/char.rs:46:23
   |
46 |                 match u32::try_from(n)? {
   |                       ^^^^^^^^^^^^^ multiple `try_from` found
...
58 | 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`
  --> 
/Users/chao/.cargo/registry/src/github.com-1ecc6299db9ec823/try_from-0.2.2/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`.
warning: build failed, waiting for other jobs to finish...
error: build failed
{code}

cc [~allengeorge]


> [Rust] library fails to build with nightly due to try_from error
> ----------------------------------------------------------------
>
>                 Key: THRIFT-4536
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4536
>             Project: Thrift
>          Issue Type: Bug
>          Components: Rust - Library
>            Reporter: Chao Sun
>            Priority: Major
>
> When trying to build the library with rustc nightly, I got the following 
> error:
> {code}
>     Updating registry `https://github.com/rust-lang/crates.io-index`
>    Compiling libc v0.2.40
>    Compiling cfg-if v0.1.2
>    Compiling integer-encoding v1.0.5
>    Compiling byteorder v1.2.1
>    Compiling try_from v0.2.2
>    Compiling log v0.4.1
> error[E0034]: multiple applicable items in scope
>   --> 
> /Users/chao/.cargo/registry/src/github.com-1ecc6299db9ec823/try_from-0.2.2/src/char.rs:46:23
>    |
> 46 |                 match u32::try_from(n)? {
>    |                       ^^^^^^^^^^^^^ multiple `try_from` found
> ...
> 58 | 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`
>   --> 
> /Users/chao/.cargo/registry/src/github.com-1ecc6299db9ec823/try_from-0.2.2/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`.
> warning: build failed, waiting for other jobs to finish...
> error: build failed
> {code}
> cc [~allengeorge]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to