1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#![cfg(feature = "serde")] extern crate cgmath; extern crate serde; use cgmath::Point1; use serde::Serialize; fn has_serialize<S: Serialize>() -> bool { true } #[test] fn test_feature_enabled() { assert!(has_serialize::<Point1<f32>>()); }