thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chao Sun (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (THRIFT-4536) [Rust] library fails to build with nightly due to try_from error
Date Tue, 03 Apr 2018 00:15:00 GMT

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

Chao Sun closed THRIFT-4536.
----------------------------
    Resolution: Not A Problem

The issue is gone since TryFrom and TryInto are removed from preclude. See https://github.com/rust-lang/rust/pull/49518

> [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)

Mime
View raw message