3 #![feature(core_intrinsics)]
4 #![feature(const_type_name)]
7 const fn type_name_wrapper<T>(_: &T) -> &'static str {
8 core::intrinsics::type_name::<T>()
11 struct Struct<TA, TB, TC> {
17 type StructInstantiation = Struct<i8, f64, bool>;
19 const CONST_STRUCT: StructInstantiation = StructInstantiation {
25 const CONST_STRUCT_NAME: &'static str = type_name_wrapper(&CONST_STRUCT);
28 let non_const_struct = StructInstantiation {
34 let non_const_struct_name = type_name_wrapper(&non_const_struct);
36 assert_eq!(CONST_STRUCT_NAME, non_const_struct_name);