3 #![feature(core_intrinsics)]
5 #![feature(const_type_name)]
8 const fn type_name_wrapper<T>(_: &T) -> &'static str {
9 core::intrinsics::type_name::<T>()
12 struct Struct<TA, TB, TC> {
18 type StructInstantiation = Struct<i8, f64, bool>;
20 const CONST_STRUCT: StructInstantiation = StructInstantiation {
26 const CONST_STRUCT_NAME: &'static str = type_name_wrapper(&CONST_STRUCT);
29 let non_const_struct = StructInstantiation {
35 let non_const_struct_name = type_name_wrapper(&non_const_struct);
37 assert_eq!(CONST_STRUCT_NAME, non_const_struct_name);