From 542e316e456b676da791585379ba7da9ebb343f3 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 7 May 2019 12:30:34 +0200 Subject: Fix derive --- dhall/src/api/mod.rs | 2 ++ dhall/tests/traits.rs | 2 +- dhall_proc_macros/src/derive.rs | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dhall/src/api/mod.rs b/dhall/src/api/mod.rs index 1522c9c..0a0ef93 100644 --- a/dhall/src/api/mod.rs +++ b/dhall/src/api/mod.rs @@ -3,6 +3,8 @@ pub(crate) mod traits; /// Deserialization of Dhall expressions into Rust pub mod de { + #[doc(hidden)] + pub use crate::phase::SimpleType; pub use crate::traits::{Deserialize, SimpleStaticType, StaticType}; #[doc(hidden)] pub use dhall_proc_macros::SimpleStaticType; diff --git a/dhall/tests/traits.rs b/dhall/tests/traits.rs index 6604c06..65220dc 100644 --- a/dhall/tests/traits.rs +++ b/dhall/tests/traits.rs @@ -5,7 +5,7 @@ use dhall_syntax::{SubExpr, X}; #[test] fn test_static_type() { - fn mktype(x: SubExpr) -> dhall::expr::SimpleType { + fn mktype(x: SubExpr) -> dhall::de::SimpleType { x.into() } diff --git a/dhall_proc_macros/src/derive.rs b/dhall_proc_macros/src/derive.rs index 1ccb28b..a5f0925 100644 --- a/dhall_proc_macros/src/derive.rs +++ b/dhall_proc_macros/src/derive.rs @@ -169,9 +169,9 @@ pub fn derive_simple_static_type_inner( for #ident #ty_generics #where_clause { fn get_simple_static_type() -> - ::dhall::expr::SimpleType { + ::dhall::de::SimpleType { #(#assertions)* - ::dhall::expr::SimpleType::from(#get_type) + ::dhall::de::SimpleType::from(#get_type) } } }; -- cgit v1.2.3