Skip to content

Commit

Permalink
Feature gate try_from
Browse files Browse the repository at this point in the history
This was discovered #5 (comment)
  • Loading branch information
konstin committed May 5, 2018
1 parent 0b511e8 commit afcc87e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(specialization, proc_macro, try_from, fn_must_use)]
#![feature(specialization, proc_macro)]

//! Rust bindings to the Python interpreter.
//!
Expand Down
1 change: 1 addition & 0 deletions src/objects/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit afcc87e

Please sign in to comment.