Skip to content

Build broken by TryFrom on latest nightly  #136

@konstin

Description

@konstin

With the latest nightly, the build fails with a bunch of errors in TryFrom like the following one.

note: candidate #1 is defined in an impl of the trait `conversion::PyTryFrom` for the type `objects::sequence::PySequence`
   --> pyo3/src/objects/sequence.rs:252:5
    |
252 |     fn try_from(value: &PyObjectRef) -> Result<&PySequence, Self::Error> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: candidate #2 is defined in an impl of the trait `std::convert::TryFrom` for the type `_`

error[E0034]: multiple applicable items in scope
  --> pyo3/src/objects/stringutils.rs:60:9
   |
60 |         PyString::try_from(ob)?.to_string()
   |         ^^^^^^^^^^^^^^^^^^ multiple `try_from` found
   |

This is most likely caused by the stabilization of TryFrom in rust-lang/rust#49305

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions