Feature gate try_from

This was discovered https://github.com/PyO3/pyo3/issues/5#issuecomment-386579894
This commit is contained in:
konstin 2018-05-05 14:43:37 +02:00
parent 0b511e8684
commit afcc87e82c
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#![feature(specialization, proc_macro, try_from, fn_must_use)]
#![feature(specialization, proc_macro)]
//! Rust bindings to the Python interpreter.
//!

View File

@ -180,6 +180,7 @@ macro_rules! pyobject_extract(
}
}
#[cfg(feature = "try_from")]
impl<'source> $crate::std::convert::TryFrom<&'source $crate::PyObjectRef> for $t
{
type Error = $crate::PyErr;