// Copyright 2017 ETH Zurich. All rights reserved. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #[macro_use] extern crate typename; use typename::TypeName; #[derive(TypeName)] struct Custom { _t: T, } fn main() { assert_eq!( Custom::::type_name(), concat!(module_path!(), "::", "Custom") ); let c = Custom { _t: 3.14 }; println!("{}", c.type_name_of()); }