#[test] fn crate_path_uses_leading_colon_by_default() { use ::functor_derive::Functor; #[derive(Functor)] struct Test(T); // would be referred to if derive macro produced `funcmap::..` instead of `::funcmap::..` mod functor_derive {} } // Our macro invocation does not support renaming the crate path. // #[test] // fn crate_path_can_be_configured() { // use fake_funcmap::FuncMap; // // #[derive(FuncMap)] // #[funcmap(crate = "fake_funcmap")] // struct Test(T); // // // would be conflicting if `Test` implemented `funcmap::FuncMap` // impl AssertNotOriginalFuncMap for Test {} // // fake_funcmap::assert::, T1, T2, fake_funcmap::TypeParam<0>>(); // } // // mod fake_funcmap { // pub use funcmap::*; // // pub struct TypeParam; // // pub trait FuncMap> { // type Output; // // fn func_map(self, _: F) -> Self::Output // where // F: FnMut(A) -> B; // } // // pub fn assert() // where // T: FuncMap, // { // } // } // // trait AssertNotOriginalFuncMap {} // // impl AssertNotOriginalFuncMap for T where T: funcmap::FuncMap {}